1723296 - How to set Parameter default date value as Current date in Crystal Reports

SAP Knowledge Base Article - Public

1723296 - How to set Parameter default date value as Current date in Crystal Reports

Symptom

  •  How to set parameter default date value to current date
  • The parameter will pass current date for a date field if we did not select any value and the parameter will pass the selected value if user selects the value.

Environment

  • Crystal reports 2008
  • Crystal reports 2011

Reproducing the Issue

Create a report with a Date Parameter.

Resolution

  1. Create a formula in designer as
  2. if hasvalue({?My Parameter}) =false then currentdate else {?My Parameter}

  3. select Report -> Selection formulas -> Record, write the below formula
  4.  

    {Field_value} <={@test}

Keywords

 

Passing current date to parameter, default date, current date, passing current date to parameter, crystal reports , KBA , BI-RA-CR-DSL , Crystal Reports on C++ Data Semantic Layer (ClassicUniverse) , How To

Product

Crystal Reports 2008 V1