cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal 2008 passing parameters to subreports

Former Member
0 Kudos

I have a report with 2 subreports. There is a date parameter for each subreport. I want to be able to only prompt for 1 date, post that on the main report then pass it to each subreport so I'm not prompted twice for dates. Example: sub_rpt_1_invoice_date = main_rpt_date. Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Right click on the subreport and go to change sub report links and add the date parameter from main report and select the date parameter from subreport and in the subreport go to record selection formula and write the condition like this

={?dateparameter}

if it is a command level parameter then you need not select any database field from subreport in change subreport links page. You can directly link main report parameter with subreport command level parameter.

Regards,.

Raghavendra

Former Member
0 Kudos

Here's the problem I'm having. The date prompts are coming of both subreports (one each), therefore we have to enter in a date twice. The date(s) we need isn't located on the main report tables, they are in the subreports (invoice and cost). Right now the subreports are linked to the main report via an contract ID field which reports back the data on. Is it possible to prompt the user for a date that isn't stored in the main report's tables, store it on the main report and/or pass it to the 2 subreports via linking so they don't have to enter the date twice?

I'm sorry, I'm not familiar with passing command level parameters and can't seem to find some examples on the internet or the manual.

Former Member
0 Kudos

When I need to do something like this, I create a parameter in the main form to hold the date, then I use it as an additional link to the subreport. Since the date is a parameter in the main report, it is not pulling from your table.

1 - Create a Parameter in the main report to prompt for the date.

2 - Edit the subreport links to add the parameter field to be mapped to the date in the subreport.

Hope that helps.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Heidi

Please refer to Crystal reports 2008 for detailed information on subreport linking.

You can download it from [here|http://help.sap.com/businessobject/product_guides/cr2008/en/xir3_cr_usergde_en.pdf]

Hope this helps!!!

Regards

Sourashree

Former Member
0 Kudos

thank you, this manual will be helpful.