Friday, March 30, 2012

How do I add a static column to a matrix?

Folks,
I'm getting data back from the database in the following format:
row_id | col_Name | col_Value
0 | ID | 10
0 | Name | First
0 | Jan | 1
0 | Feb | 2
1 | ID | 20
1 | Name | Seconds
1 | Jan | 10
1 | Feb | 20
...
We are grouping based on the row_id db column, thus creating dynamic columns
for ID, Name, Jan, Feb, etc.
However, I need to customize the ID and Name column which is, to my
understanding, not something that can be done if they are dynamic columns in
the matrix.
So, what I was thinking of doing was to make two static columns, ID and
Name, and then filter those rows out of the dynamic columns. However, when I
make a second ColumnGrouping in the RDL file for these, and define the two
static columns, what happens is that they appear set up such that these
columns would be in a separate row, rather than off to the left of the rows
of dynamic columns (hopefully I'm explaining this well enough).
What would be the best way to accomplish this, presuming that we can't
simply have the returned data changed to a better format?
Thanks!
randyAssuming you want to transform your table to:
ID | Name | Jan | Feb
10 | First | 1 | 2
20 | Seconds | 10 | 20
etc.
The easiest is to tweak your SQL, but I am assuming this is the result of a
SP that you can't since you said:
> What would be the best way to accomplish this, presuming that we can't
> simply have the returned data changed to a better format?
I'm not sure if you can, but you might have to do this with a custom code
module to transform your data and then bind the report to the dataset from
code. Maybe someone else knows way to modify the underlying dataset
structure.
"Randy Chapman" <RandyChapman@.discussions.microsoft.com> wrote in message
news:5F87A271-7591-4453-975F-06394CC8E2A8@.microsoft.com...
> Folks,
> I'm getting data back from the database in the following format:
> row_id | col_Name | col_Value
> 0 | ID | 10
> 0 | Name | First
> 0 | Jan | 1
> 0 | Feb | 2
> 1 | ID | 20
> 1 | Name | Seconds
> 1 | Jan | 10
> 1 | Feb | 20
> ...
> We are grouping based on the row_id db column, thus creating dynamic
> columns
> for ID, Name, Jan, Feb, etc.
> However, I need to customize the ID and Name column which is, to my
> understanding, not something that can be done if they are dynamic columns
> in
> the matrix.
> So, what I was thinking of doing was to make two static columns, ID and
> Name, and then filter those rows out of the dynamic columns. However,
> when I
> make a second ColumnGrouping in the RDL file for these, and define the two
> static columns, what happens is that they appear set up such that these
> columns would be in a separate row, rather than off to the left of the
> rows
> of dynamic columns (hopefully I'm explaining this well enough).
> What would be the best way to accomplish this, presuming that we can't
> simply have the returned data changed to a better format?
> Thanks!
> randy
>

No comments:

Post a Comment