Reputation: 15
i need to create parameter list of months and then (after select) recalculate two others paramateres in date format ([first day] and [last day]) of this month, can you please help me?
Upvotes: 0
Views: 1358
Reputation: 4100
You are querying a database server to generate the list of months, although there's no need to do that. I suggest to rather create a list of months in the report and let the report calculate the month's names, so the language depends on the Language setting of the report (which can be the language configured in the user's browser).
For example, to calculate the Label for the Value 1
, use an expression like =MonthName(1)
.
The Parameters FirstDay
and LastDay
(or just the values whenever you need them) can be calculated using these expressions:
=DateSerial(Today.Year, Parameters!Month.Value, 1)
=DateSerial(Today.Year, Parameters!Month.Value, 1).AddMonths(1).AddDays(-1)
Upvotes: 0