Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

SSRS - Default Value to be set from Today's Date (Date Report is Run)

$
0
0

I have a report that has a few Cascading Parameters.

The first parameter is the Calendar Type. This will be Weekly or Monthly. A Calendar Type will then have Financial Years and Financial Periods attached.

So Weekly has Years - Weekly2016 (could also have Weekly2017). So in the example below if I just select Weekly CalendarType, I will only see the Years linked to Weekly and not the Monthly and when I select the Financial Year Weekly2016, only the Financial Periods for that  Year will show.

I have set the Calendar Type to default to have both Weekly and Monthly selected.

The difficulty I am having is setting the Financial Year and Financial Period as a default. 

Included in the datasets for both Financial Year and Financial Period, are the Description (which the parameter presents to the end user) but also a Start and End Date. What I want the Default value is to look at these start and end dates and todays date and work out that it needs to set the following defaults if I ran it today 28/07/2016   - 

Financial Year - Weekly2016 (as today is 28/07/2016 and the Start date is 01/04/2016 and End Date 31/03/2017, the report run date falls in between those start and end dates)

Also Monthly2016 would be defaulted.

Financial Period would work in the same way as it also has has a start and end date. Period Weekly201617 would be what I expect to be defaulted as the start date is 25/07/16 and the End date is 31/07/16.

If I were to run the report next week the Year would be the same, but the period would have moved onto Weekly201618.


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>