I'm using Reporting Services 2008 R2 connecting to Analysis Services. I've used this same code without issues before (pre R2), just wondering whether it is an RS, AS, Server or some other issue entirely.
I have a report with a datetime parameter @vdtmDate (I use this so the user has the date picker instead of a drop down list of dates) with default
=DateAdd(DateInterval.Day, -1, Today())
Then in the MDX for the dataset, I use the following to build the filter.
SET [Today] as STRTOSET('[Calendar].[Reporting Week].[Day].&[' + VBA.FORMAT(VBA.CDATE(@vdtmDate),'yyyyMMdd') + ']')
The issue I'm having is when the report runs with the default parameters, the value passed to Analysis Services includes the timezone which causes the query to process for the previous day to that selected. When the user runs the report manually (ie
just pressing the view report button straight after the initial report load) the date passes without the timezone and returns the correct information.
Example, running the report today (3rd September), the default parameter passes the value (info from profiler)
View Complete Post