Report variable - setting default date values
Posted: Wed Oct 12, 2011 7:01 pm
I have set up two report parameters, StartDate and EndDate, which are datetime (with format of Date). I have found that:
- The date controls in preview (which the user controls) shows Today's date, even if I put in an expression like "Today.AddMonths(-2)".
- If I leave one of the values with a default expression of "Today", my SQL parameters seem to use Today for both dates. However, a text control displays the date correctly. Note that changing both date expressions from Today (eg, "Today.AddMonths(-2)" and "Today.AddDays(1)") fixes the SQL parameters.
- The date controls in preview (which the user controls) shows Today's date, even if I put in an expression like "Today.AddMonths(-2)".
- If I leave one of the values with a default expression of "Today", my SQL parameters seem to use Today for both dates. However, a text control displays the date correctly. Note that changing both date expressions from Today (eg, "Today.AddMonths(-2)" and "Today.AddDays(1)") fixes the SQL parameters.