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!

Passing date range formula from main report to sub report

Status
Not open for further replies.

rwwagner

Programmer
Mar 18, 2021
1
US
Hello!!

I'm fairly new to CR. Ive been working on CR that has five sub reports. The program I use to run the report in (Enterprise Asset Management/Lucity) breaks the report when trying to run it due to each sub report having a date range located inside it. It says I need to pass the formula field from the main report to the sub reports and the sub reports can not have parameters. Could anyone help accomplish this? I've tried on my own with no luck. Ive included a current test copy of my report. Thank you for your time!

Robert
 
 https://files.engineering.com/getfile.aspx?folder=7e04379d-11d9-48d0-83a1-3bc6cf66323c&file=SWRMnthly_Weekly_Report_CURRENT_TEST.rpt
So why can't the sub-reports have parameters? Normally I set up date parameters the same as what is in the main report. Then link the parameters. I tried upload pictures, but it did not work. I would show you the modified report, but you are working on an older version of Crystal than I am. FYI: I work for the County of Tulare in the Central Valley.
 
You should set up Parameters {?Start Date} and {?End Date} parameters in each subreport and ditch the date range parameter. Be sure to change your selection formula within the subreports to use the start and end date parameters and remove the date range parameter BEFORE you try to do the linking. Then in the main report, go to edit subreport links and select the subreport and then move {?Start Date} to the right and in the bottom left of the screen, use the drop down to select {?Start Date} instead of the default {?pm-?Start Date}. Repeat for the end date. Repeat all for each subreport. You will then get one start date prompt and one end date prompt for the report as a whole. Note that all parameters must be of the same type.

I didn't look carefully to see why you needed to use all these subreports vs one report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top