Symptom
Environment
Crystal Reports 2011
Resolution
- Create a formula in the Main report; call it Start_date: Minimum({?Date_parameter})
- Create a second formula in the Main report and call it End_date: Maximum({?Date_parameter})
- Insert the sub-report
- Right-click the sub-report and select "Change Subreport links"
- Move the Start_date and End_date formulas to 'Fields to Link to' area
- Make sure to uncheck the 'Select data in subreport based on field' option
- Edit the sub-report (Right-click > Edit)
- 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}
Keywords
dt val month week day span , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To
Product
Crystal Reports 2008 V1 ; SAP Crystal Reports 2011, feature pack 03 ; SAP Crystal Reports, developer version for Microsoft Visual Studio