05 May 2012

Pass value from main report to sub report

I am designing a report which includes sub report every thing is fine but i have to display the main report field value in sub report . To get the main report vale in to the sub report follow the bellow steps.
Step 1:
1. In main report create a formula, name it, edit it with the formula editor as follows:
Shared numbervar NAME := {Rep.Sno} 
Save formula.  Note that you should replace the name and type of variable and a formula with ones of your own
2. Now create a formula in your subreport, name it, edit it with the formula editor as follows:

Shared numbervar NAME;
NAME
3. Use formula created in step 2 in your report (drag drop in the report from formula fields.
Note that subreport is processed after the main report, so it's easier to pass values from main report to subreport.

No comments:

Post a Comment