SAP Knowledge Base Article - Public

1686479 - How to pass a date range value to a subreport



Crystal Reports 2011


  1. Create a formula in the Main report; call it Start_date: Minimum({?Date_parameter})
  2. Create a second formula in the Main report and call it End_date: Maximum({?Date_parameter})
  3. Insert the sub-report
  4. Right-click the sub-report and select "Change Subreport links"
  5. Move the Start_date and End_date formulas to 'Fields to Link to' area
  6. Make sure to uncheck the 'Select data in subreport based on field' option
  7. Edit the sub-report (Right-click > Edit)
  8. Go to Report > Selection Formulas > Record and insert a Record Selection formula to include the parameters from the Main Report:


{date_field} >= {?Pm-@Start_date} and {date_field} <= {?Pm-@End_date}


dt val month week day span , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To


Crystal Reports 2008 V1 ; SAP Crystal Reports 2011, feature pack 03 ; SAP Crystal Reports, developer version for Microsoft Visual Studio