While working with SSRS reports for displaying some financial data; many a times we have to display data for particular time-frame. Or most commonly – last 12 month’s data.
I am talking about the case where you are pulling data from SSAS Cube using MDX queries. In this particular example, I need to display SSRS report for last 12 month’s data from SSAS Cube. So I need to provide 2 things: StartDate and EndDate.
But as the default expected behavior of the Report requires EndDate to be today’s date so we have to dynamically configure today’s date in EndDate parameter. We also have to determine the date of 12 month’s back to today’s date for StartDate parameter.