Crystal Reports – Passing parameter values from main to subreport

Test Environment: Crystal Reports Basic for Visual Studio 2008


  1. Create Main Report [Eg:myMainReport.rpt]
  2. Create SubReport [Eg:mySubReport.rpt]
  3. Pass parameters [From database/through code] to Main report
  4. Choose which parameter(s) [Eg.{Discount}] you want to pass to Sub Report
  5. Open mySubReport; Create a parameter in the format [Name]:{Pm-?ParameteName} [Eg:{Pm-?Discount}] as normal parameter field; Place this parameter in the app section of the report to display.
  6. Open myMainReport; Select ‘mySubReport.rpt'; Right-Click, Click ‘Re-Import sub report’
  7. Again Right-Click, Click ‘Change sub-report links’
  8. In the new wizard choose ‘Available Fields'; then select ‘Discount’ under ‘Report Fields'; Drag this to ‘Field(s) to link to’ section
  9. Under ‘?Discount field link’ dropdown list select {?Pm-?Discount}; This will gred-out ‘Select data in subreport based on field’ tick box and also its dropdown list,Finally click OK.
  10. Done & Run to Check

4 thoughts on “Crystal Reports – Passing parameter values from main to subreport

  1. PRAVEEN SAINI says:

    Hello Jyothi,

    I am trying to pass parameters from VS 2008 to a crystal sub report. And have explored almost all options but with no success. Can u please help me, my subreport dataset remain saved with the parameters with which I test it in crystal reports but when I try to pass parameters thru .aspx page it does not update.

    Thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">