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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport - How to enter One set of dates for all reports 3

Status
Not open for further replies.

beanNut

IS-IT--Management
Jun 2, 2004
28
US
I'm using Crystal 9 with Oracle database. I have a report with 2 subreports all using the start and end date. I link the 2 subreports to main report using the start dates as the link. Now I'm prompted for 6 dates - (2 for each report). Thats nice if I each of the reports were different, but since they all should you the same dates. How do I set it up so it only prompts for 2 dates?
Is there some sort of trick here that I'm missing?
 
Hi,
Be sure no parameters are defined in the 2 subreports.

Use Edit..Subreport on each to check..

Just 2 parameters ( or 1 range type), defined in the main report, are all you need.


[profile]
 
One other step.

From the main report, right click on the subreport and click on Change Subreport Links and your parameters, {?FromDate} and {?ToDate}.

On the bottom of the the Subreport Links window, check the select data in subreport based on field and select your {table.date} field you orginally created a parameter.

Cheers,

-Larry



 
Remove the date parms from the subreports.

Right click each subreport and select change subreport links. Point at the parm from your main report as the source, and the date field in the subreport as the link.

Now there's only on e parameter, and it correctly links.

Do this for all subreports.

-k
 
I find that in some cases you need the parameters in the subreports, e.g., if you are sharing the same date period for subreports in the report header or footer, but not actually wanting to link data by date. In that case, you would use your parameters in the subreport record selection formula as you would in a main report. Then when you link the subreport to the main report, choose the {?startdate} parameter in the main report and for the subreport, use the drop down list (NOT {?pm-?startdate}) to find your correct parameter name {?startdate}. Link on this. Repeat for the end date. That will allow you to share date ranges.

-LB
 
Thanks, Everyone suggestions helped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top