Crystal Report : How to link from 1 report to another report
I am using Crystal Reports with C# programming language.
I want to open another report by clicking on link eg. I show Invoice's Summary like its number (named InvNo), date, items and TotalAmount. Now I would like to open another report when user clicks on InvNo column. If user clicks on Invno 0001 then another report should be opened showing Ite开发者_Go百科m-wise details...Is there any solution for this?
There are two 'linking' options:
- use an 'on-demand' subreport - this is a report embedded in another report. it is NOT generated until its link is clicked. 'standard' subreports are generated at the same time as the 'main' report. in either case, a subreport can NOT contain another subreport.
- create a hyperlink to another report by setting a field's Hyperlink property (choose the 'A Website on the Internet' option). if you create a conditional formula (the 'X+2' button), you'll have more control over the URL that is generated. you'll probably want to create a controller page (like 'view_report.aspx') that parses the querystring for the report's id (id=234), opens the report, authenticates, add parameters (country=USA®ion=MN&start_date=20110501), generates the report, then returns it.
Use option 1 for the summary, then use option 2 for the item's details.
If you are using BusinessObjects Enterprise, use UrlReporting for option 2.
I believe subreports functionality is an answer to your question.
You would need to enter a formula that conditionally shows/hide them (they should be hidden by default). Unfortunately I cannot tell you how to do that from the back of my head, since I haven't worked on CR for pretty long time now... Please find few links here.
精彩评论