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 2008 Forums
 Analysis Server and Reporting Services (2008)
 Display Month Name as Header

Author  Topic 

Villanuev
Constraint Violating Yak Guru

478 Posts

Posted - 2012-07-30 : 23:38:32
Hi Forumer's

I have an SSRS Report with date parameter.
the value of this script will be my report column header.
So, I tried to create a variable monthcount6.

the value of this script will be stored in variable MonthCount6.
When i tried this in SSRS i have an error. how to work on this in SSRS to display the month name.

MonthCount6= DATEADD(mm, DATEDIFF(mm, 0,GETDATE()), 0))

Result: JULY


Thank you in Advance..

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-30 : 23:49:27
use

=MonthName(DatePart("m",Fields!MonthCount6.Value))

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

Go to Top of Page

Villanuev
Constraint Violating Yak Guru

478 Posts

Posted - 2012-07-31 : 00:37:44
Thanks visakh for your reply..

Here is what i do.

=MonthCount6=MonthName(Month(DateAdd("M",0,Parameters!StartDate.Value)))&" "&(Year(DateAdd("Y",0,Parameters!StartDate.Value)))
Go to Top of Page
   

- Advertisement -