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

Passing Value to Subreport's Command Prompt

Status
Not open for further replies.

nobull613

Technical User
Jun 6, 2003
76
0
0
US
I have a main report pulling data from a Date Dimension table and am grouping on a formula that cals the first date of each month as DateTime. Within each group I have a set of subreports hitting a MSSQL Database using a Command. Within each command I have created a DateTime parameter which is passed into the Command which work fine individually.

I cannot get the grouping formula in the main report to pass to the subreport to be used as the Command's prompt. I've gone into the Change Subreport Links and bound the grouping formula to any specific datetime field and also tried to not link it to any field. Every way I've tried this, I've gone into the subreports' Record Selection Formula and set the formula to {?CommandPrompt}={?Pm-@GroupFormula}.

When I run the main report it prompts me to enter a value for all of the Subreports Command Prompt field. If I enter a specific month start datetime, the report runs fine but all other months are not pulling for the subreports.

How do I set that Command Parameter/Prompt to be the Grouping Formula linked to the subreport and run that way for each grouping without prompting the user to provide input??

Thanks
 
I think this relates to the order Crystal Reports uses to do the various tasks. If your Grouping Formula depends on several records, that would do it.

Is it possible to pass the subreport a date and have the subreport calculate the first date of each month?

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Thanks for the reply Madawc. I actually found the issue was in my subreport link configuration with the main report. Within the Change Subreport Links window I needed to use the bottom-left drop-down to select the Subreport Parameter versus the bottom-right drop-down box that uses a specific field. Once I did that it worked fine.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top