I have a Time and Billing OLAP cube which I'm running RS against. I'm
stumped on a date issue.
How can I run a report which selects the last 7 days worth of data and rolls
forward each week? I've tried using an MDX query with the Tail funtion.
This pulls the last date which has data in it. (Effectively yesterday's
date) When I run it in MDX builder it gives me the desired results. However
when I use it in VS.Net to build my report, it pulls the last 7 days over,
but it's static and doesn't roll forward.
I can make a report with a date drop down parameter which is described in
the AS and RS article on Technet, but I'd really like the parameter to be
automatically selected based off of the date when the report is run.
My date formats in my cube are [Year].[Quarter].[Month].[Day]
Can anybody help me with this?
Thanks, MattTry setting defaults for your start and end date parameters. For
example, you can set the end date to
DateTime.Now.AddDays(-1).ToString("MM/dd/yyyy") and the start date to
DateTime.Now.AddDays(-7).ToString("MM/dd/yyyy"). When you see the
parameters in subscription creation, it may look like they are
hard-coded, but they aren't as long as the default checkbox is selected.|||Thanks for the suggestion... I think I'm close...
The problem is that my date needs to be in a [Time].[FY Calendar].[All
Time].[Year].[Quarter].[Month].[Day] format.
As you probably can tell, I'm a newbie to VB Scripting. How can I convert
your suggestion "DateTime.Now.AddDays(-1).ToString("MM/dd/yyyy")" to my cube
format? I think if I can do that, I can get it to work.
Thanks,
Matt
"Kenny" wrote:
> Try setting defaults for your start and end date parameters. For
> example, you can set the end date to
> DateTime.Now.AddDays(-1).ToString("MM/dd/yyyy") and the start date to
> DateTime.Now.AddDays(-7).ToString("MM/dd/yyyy"). When you see the
> parameters in subscription creation, it may look like they are
> hard-coded, but they aren't as long as the default checkbox is selected.
>
Thursday, February 16, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment