Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with Hyperlink formula and procedure

Status
Not open for further replies.

ChipDancer

Technical User
Jul 31, 2003
6
US
I am using Crystal Reports 9 and am trying to do the following, but do not yet have the experience of some of you guys so some aid would be most appreciated.

I have a report where I am using a numerical field as a hyperlink to access another report.

The goal is to have the other report open and filter only that matching number from the specified report's specified field.

I have no idea how to write a formula to do this.

I hope I have explained this clearly.

Thanks in advance,

ChipDancer
 
I can't respond to your question about using a hyperlink, but I'm curious why you are not choosing to use a subreport to accomplish your goal. It seems like a subreport would allow you to do the same thing, and you could link on the numerical field.

-LB
 
No can do. A sub report is just that, a report based off a different data source that is included in the report.

What I need to be able to do is for the client to click on the hyperlink and open the other report seperately in crystal (which I can do), but with the report being opened with the specified client number of the hyperlink (which I have no clue as how to do!).

Thanks in advance for any help out their guys!
 
Actually, a hyperlink to another Crystal report is the same as an on-demand subreport, according to Crystal help files. To create the link, you just select the field you want as the hyperlink->format field->hyperlink->file->browse->all files->the report you want to open. Clicking on the field in your source report then opens the second report. There is supposed to be a way to create a conditional string formula in the x+2 area to limit records in the second report based on the value in the first report, but I wasn't able to figure out how to do that.

Using the on-demand subreport method, you could link the subreport to the specific value and return results only for that value, so you might want to experiment with this.

-LB
 
Here is the issue with using the On-Demand sub report, which I did try; The report being pulled up is a detailed client info report with several sub reports of it's own already in existance.

So yes, an On-Demand sub report would be great and do the job if it wasn't for the limitation of nested sub reports.

That being Crystal does not allow you to have a sub report with sub reports of it's own.

That is why the Hyperlink option is being persued.

Now if someone knows a way around the nested sub report limitation by all means please tell me!
:)

Thanks in advance for all the help guys!

ChipDancer
 
I'm not aware of a way around the nested subreport limitation.

However, have a look at 3rd-party solutions listed at:

For example, my "DataLink Viewer" allows you to view one Crystal report and launch another one by double-clicking a report section. A formula embedded in the report section determines the report to be launched and the parameter values passed to it.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Just learned through another post--Jamfool figured this out--how to hyperlink to another Crystal Report. Without selecting anything in your source report, you cannot access the hyperlink option through the format editor, and yet this is the method for linking to another Crystal Report--no object can be selected. The solution is using the hyperlink icon in the tool bar. When you create the hyperlink this way, after choosing the report you want to link to, you can place the report within the source report, i.e., you are creating an on-demand subreport, with the limitation of no subreports within the subreports. You can link to a specific field within the main report by going to "edit subreport links" in the main report.

For your particular problem, the question is whether you could redesign the on-demand subreport so that it doesn't use subreports.

-LB
 
Ibass,
Unfortunately recreating the second report without sub-reports is impossible and thus not an option because the second report is a detailed billing and finacial record of the client. There are six total sub-reports in that report alone and all of them are absolutely required.

But thanks for the suggestion!

What I really wish I had was an example of how to link to a particular field in another report via a hyperlink.

Thanks in advance for all the aid!

ChipDancer
 
IdoMillet,

I looked at yer site and at the product you have.
Question: How does the data viewer link the two reports via specified fields without running into the nested sub-report limitation.

PS: I also noticed you are an instructor in Crystal; is there no way to write a formula to use under the hyperlink's x-2 box to have the hyperlinked report called by specific field?

Thanks in advance for all the great help!

ChipDancer
 
ChipDancer,

You can successfully use hyperlinks to get around the nested problem you'd run into using on-demand subreports.

You would, however, need to supply a parameter for each of your hyperlinked fields.

If you wanted to trigger a hyperlink off've a numerical value, I would imagine your report structure looking a little like this:

Parameters:
1) ?Parameter1
2) ?Parameter2 (Parameter2 is based on your numerical hyper)

Selection Criteria:
{Field1} = {?Parameter1} and
(
If {?Parameter2} <> 0
Then {Field2} = {?Parameter2}
Else {Field2}
)
//The above presumes that if the parameter value was left at zero, then there would be no filter applied to the field.

Your Hyperlink:
(Your URL details) + &quot;&promptex0=&quot; + '%22' + {?Parameter1} + '%22' + &quot;&promptex1=&quot; + '%22' + {Field2} + '%22'

(The %22s clauses in the example are optional. I just use choose to use them because it's good practice - especially on a unix platform.)

As you're populating Parameter2 (&promptex1) in the hyperlink with the field value, whatever the field value is at that point in the report will be passed to the destination report as the filter. (Providing, in this example, the field value is <> 0)

All the best,

Naith
 
Thanks Naith,

I will try messing with that a little later today!

:)

ChipDancer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top