hey man, put this in your stored procedure...
DECLARE @abbrev TABLE(monthid INT, monthname VARCHAR(3))
INSERT INTO @abbrev
VALUES(1,'Jan')
INSERT INTO @abbrev
VALUES(2,'Feb')
INSERT INTO @abbrev
VALUES(3,'Mar')
INSERT INTO @abbrev
VALUES(4,'Apr')
INSERT INTO @abbrev
VALUES(5,'May')
INSERT INTO @abbrev
VALUES(6,'Jun')
INSERT INTO @abbrev
VALUES(7,'Jul')
INSERT INTO @abbrev
VALUES(8,'Aug')
INSERT INTO @abbrev
VALUES(9,'Sep')
INSERT INTO @abbrev
VALUES(10,'Oct')
INSERT INTO @abbrev
VALUES(11,'Nov')
INSERT INTO @abbrev
VALUES(12,'Dec')
and then join the table to your query like:
INNER JOIN @abbrev a
ON LEFT([yourmonthcolumnname],3) = a.monthname
then in the report for the column header properties - visibility code in
[expression]:
=IIF((Parameters!{yourmonthcolumnname].Value)=0,True,False)
peace out...
[quoted text, click to view] "Vishal" wrote:
> Hi,
>
> I am trying to design a report with has data for the past 12 months. i.e.
> user parameters are Month = 4 & Year = 2005, the report should have columns
> from 05/2004 to 04/2005 i.e. past 12 months.
>
> I have managed to get the data using a stored proc, how can get the column
> headings to be dynamic ?
>
> something like this
> May 2004, June 2004 .............. April 2005
>
> Thanks
>
>