0
votes

I'm working on a report that reports on a month that a user can select from a drop-down and also reports on the cumulative data for the fiscal year up until the month selected.

How would I go about setting up the parameters so that they can select this fiscal year first from the drop-down and then the second drop-down list with automatically populate which months in that fiscal year has completed or is currently in?

For example, I choose '2019' for my fiscal year, the month date should only show the following choices: October, November, December.

1
Welcome to Stack Overflow! You will find that you will have a better experience if you take moment to take the Stack Overflow tour. You can also read about asking a good question. If you follow the norms of the Stack Overflow community and approach it with an attitude of helping others too, it will serve you well.StoneGiant
what your looking for is CASCADING parameters. You will need to create 2 datasets. 1st one for year and a 2nd one for months. ds_months will take year as a parameter. Finally on sql side of your ds_month you will have to get top 4 and order by desc. and then take ranks 2, 3, 4 (as you want last 3 months)junketsu

1 Answers

1
votes

You may create table with such fields: Year, Month. Run such code

select distinct Year from table order by Year desc

to select all fiscal years. Add change event listener to drop-down (fiscal years), on fire run such code:

select Month from table where Year = @year

to select months (@year - chosen fiscal year)