Column Data as a Column Header in SSRS 2012
-
Friday, March 08, 2013 8:12 PM
I want to use the column data as a column header in the SSRS report. I am using the column data as a column group while creating the SSRS report. But depending on the filter conditions, the header columns changes dynamically. How can we make it static?
For eg.
Supplier Flow Amount
====== ===== ========
A Adhoc 20
A Pay 30
B Adhoc 15
So when I select the Supplier A as a parameter, report output is
Supplier Adhoc Pay
A 20 30
but when I select the supplier B as a parameter, report output is
Supplier Adhoc
B 15
What I want when supplier B is selected, report output should be
Supplier Adhoc Pay
B 15
Arunava
All Replies
-
Saturday, March 09, 2013 12:38 AM
hi,
you have to use expression on your headers and hide columns depending on your parameters
regards
Dj's | Please mark as answered or vote helpful if this post help resolved your issue. Thanks!
-
Saturday, March 09, 2013 3:27 PM
Hi Arunava,
I guess,you will get the desired report view by default in SSRS
What I want when supplier B is selected, report output should be
Supplier Adhoc Pay
B 15
Only if you want hide the column Pay for parameter = Supplier B,make use of IsVisibility Function in SSRS
http://sathyadb.blogspot.in/2013/01/ssrs-ismissing-visibility-function.html
Thanks & Regards, sathya
- Edited by SathyanarrayananS Saturday, March 09, 2013 3:28 PM
-
Monday, March 11, 2013 8:05 PMI am using a column group for pivoting the column data into column header (value of "Flow" into column headers in the report). Now, if the Flow value "Pay" itself is not present in the data set when I select Supplier B, how can I use the expression to hide?
-
Monday, March 11, 2013 8:58 PM
Pay does not exist for Supplier B so there is no data to generate that column header when B is selected. The only way I know of to work around this is to ensure that all desired header values are included in the data for all suppliers.
If you are using TSql, you can use a UNION statement to add a default "zero" row for each supplier. This works best for a small, fixed number of suppliers. If you have a variable or larger number of suppliers then a UNION that adds a single "zero" row for a default supplier, maybe 'Default Supplier'. You then need to rework you supplier group to group on =IIf(Fields!Supplier.Value="Default Supplier", Parameters!Supplier.Value, Fields!Supplier.Value). This should group the default "zero" data row with whichever Supplier is selected in the parameter. This assumes the parameter is a single-value parameter, not multi-value. Also assumes the parameter value will be identical to one of the values returned for Supplier in the dataset.
"You will find a fortune, though it will not be the one you seek." - Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek.- Proposed As Answer by Charlie LiaoMicrosoft Contingent Staff, Moderator Tuesday, March 12, 2013 7:25 AM
- Marked As Answer by Charlie LiaoMicrosoft Contingent Staff, Moderator Friday, March 15, 2013 10:06 AM

