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
 Development Tools
 Reporting Services Development
 Display month name

Author  Topic 

dachizek
Starting Member

3 Posts

Posted - 2006-01-09 : 15:31:05
I have a report that shows last months information. The header of the report displays it in the form of "December, 2005". I found out that you cannot go into database and retrieve information from a report header (otherwise I could use sql's DateAdd to subtract months). Is there a DateAdd function of some sort that works with sql reporting and some way to display the results as words? When i currently display the date (without subtracting a month) it just returns as 1/2006 without January spelled out.

Thanks,
Dan Chizek

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-01-09 : 15:56:12
Reporting Services uses VB.NET as the programming language. There are lots of date functions available in VB.NET. Are you familiar with VB.NET or any of the .NET languages? If so, this should be cake for you. I typically use MSDN as my source for looking up functions.

Tara Kizer
aka tduggan
Go to Top of Page

jhermiz

3564 Posts

Posted - 2006-01-09 : 17:16:09
Doing this in the backend procedure you could do:

SELECT DATENAME(month, getdate())

Or the rs tool using friendly format function

=Format("m", Fields!yourField.Value)

If this is a graph type report you can group by DATENAME(month, getdate())



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]

RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url]
Go to Top of Page

dachizek
Starting Member

3 Posts

Posted - 2006-01-09 : 17:43:47
Ok simple enough. I got it to work now that I know which language it uses.

Thanks
Go to Top of Page
   

- Advertisement -