Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Customizing Report: Identifying month

Author  Topic 

andros30
Yak Posting Veteran

80 Posts

Posted - 2010-02-25 : 15:20:45
I have a report that I'd like to include the month to identify to the users for what month the report is running for.

Currently I have one parameter called "MonthsBack" which is an integer. If 0 then it will take the report date of the current day, if 1 then it will take the report date of the 1st of the current month.

What I'd like to do is on the title of the report to say "Performance Report: January" where January is determined by the MonthsBack parameter. In this case if I run the report today and the parameter is 1 then it will say January. If the report is run today and the parameter is 0 then it will say February.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-26 : 09:00:00
thats easier. use an expression like

="Performance Report: " & IIF (Parameters!yourparam.value=0, MonthName(Month(Now())),MonthName(Dateadd(MONTH,-1,Now())))

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

andros30
Yak Posting Veteran

80 Posts

Posted - 2010-03-01 : 13:45:17
Thank you. It works.
Go to Top of Page
   

- Advertisement -