How can we pass a parameter from main report to subreport in crystal reports XI

Viewed 84922

How can we pass a parameter from the main report to a subreport in Crystal Reports XI? I have a parameter in the main report. Now, I want to pass the same parameter to subreports. Please help me.

7 Answers

Right-click on the subreport object and choose Change SubReport Links, then select how the parameter is to be used by the subreport.

Subreport linking of paramters

Perform following easy steps:

  1. Create New Parameter lets say "StartDate" in Parameter Fields in Field Explorer in Crystal Report
  2. Create New Parameter lets say "StartDateSubReport" in Parameter Fields in Field Explorer in your Subreport
  3. Now in Main report file, Right Click Subreport lets say "EmployeesList.rpt" and click Change Subreport Links menu
  4. Select "StartDate" from Available Fields from Available Fields Tab and click on ">" button to make it vailable to link in subreport
  5. Now bind your "StartDate" which you have made available by selecting it with "StartDateSubReport" in dropdown available in "Subreport Parameter Field to use"

https://kb.blackbaud.com/articles/Article/52328

Create a parameter field in the main report. From the main report, right click on the subreport, and select Change Subreport Links. In the subreport linking window, select the parameter field from the window labeled "Available Fields", and click on the ">" button to move it to the window on the right labeled "Fields to link to" Below, make sure you have a check next to Select data in subreport based on field. Below the checkbox, if it is not already there, select the field from the subreport, to which you would like the parameter field linked. Click OK

Related