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
Thanksyou need to use a matrix.
The concept is pretty much easy after you get you head around how a
matrix works. Try a tutorial on how to design a matrix and then give a
go using your data.|||Did you get this to work? I am having the same problem... I don't
understand the matrix suggestion... From what I can tell Matrix
reports still require that you use the Column Headings returned in a
dataset... and they don't change as your data changes.
I guess for a Matrix report you have to flip your time into rows
instead of columns... is that right?
Let me know if you get this working. I am about to pull my hair out.|||I dont think the matrix report is as simple as they make it sound. I would
rather have someone post and tell me how to "simulate" a matrix but the
headings have to be dynamic since I wont know what input parms the user will
enter for the start and end dates - I have to do the past 12 months as well
just like the initial post.
Another issue with matrix is that the columns you use for groups dont have
headers which is strange (at least not when I did the wizard)
"JoelBarish" wrote:
> Did you get this to work? I am having the same problem... I don't
> understand the matrix suggestion... From what I can tell Matrix
> reports still require that you use the Column Headings returned in a
> dataset... and they don't change as your data changes.
> I guess for a Matrix report you have to flip your time into rows
> instead of columns... is that right?
> Let me know if you get this working. I am about to pull my hair out.
>|||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...
"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
>
>
No comments:
Post a Comment