Stolz
Stolz

Reputation: 15

SSRS select parameter month and change par. first and last day of this month

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

Answers (1)

Wolfgang Kais
Wolfgang Kais

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).

Month parameter

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:

  • FirstDay: =DateSerial(Today.Year, Parameters!Month.Value, 1)
  • LastDay: =DateSerial(Today.Year, Parameters!Month.Value, 1).AddMonths(1).AddDays(-1)

Upvotes: 0

Related Questions