September 15, 2011 at 5:02 am
The chart in the report is looking at a stored procedure (sp) which returns several fields i.e. field1, field2, field3, datefield, etc...
Based on a bit value parameter to the sp, the field3 is either returned or not. i.e.
if (@Net = 0) -- do not show field2
select field1, field3, datefield from table1
else if (@Net = 1) -- show field2 as well as other fields
select field1, field2, field3,datefield from table1
datefield is on the horizontal axis.
The values for the report are sum(field1), sum(field2), sum(field3)
Question:
How can the report show the required fields in the values section based on the bit value parameter passed to the sp? Is there a way to show/hide one of the value fields? is there a way to show/hide one of the legends?
Thanks
September 15, 2011 at 9:38 am
There is Hide (?- sorry do not have access to SSRS right now) property for column-
use IIF function and assign 0 or 1 to hide/show column depending on your SP results
September 15, 2011 at 10:20 am
Did you try using the case function
(Case when (@Net = 0) then field1, field3, datefield from table1 Else........end)
September 15, 2011 at 10:21 am
solved.
Thanks
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply