#1 2021-01-25 18:56:26

Registered: 2016-10-29

Default date parameter in report?

I have a query that I parameterized with “today”. I created a variable today which I use in the query using ${today}. What I would like is that this defaults to the current date if not set by user.

The issue is that in a derived report, ReportServer seems to require filling out the date.

I tried making it not required, but then setting default to using a function that returns current date. That doesnt seem to work either.

How do you create a parameter that defaults to a function call if not set?


#2 2021-02-05 14:26:05

Registered: 2016-11-01

Re: Default date parameter in report?

Hi bpeikes,

did you take a look at this? https://reportserver.net/en/guides/admi … eter-date/

6.3.5. The Date Parameter
With the date parameter you can enable the users to select from a date or time field. As a default value you can either use the current date and current time (Now as default), you can allocate a fixed date, or you can determine the default value by using a ReportServer formula expression (e.g. ${today.firstDay()} for the first day of the current month). For further information on the ReportServer formula language refer to the User manual.



Board footer

Powered by FluxBB