Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

Formula for visibility propertyIIF(INSTR(Join(Parameters!section.Value), "GCG") > 0 OR Parameters!section.Value(0) = "-1", false, true)

$
0
0

Hi All,

I want to calculate a formula, depending on that formula, I want to hide and make the column visible.  I have a column called SN. I want to make it visible when the value of the parameter called @section is “GCG” otherwise I want to make it invisible. Same thing with another columns, if @section parameter is “GED” then I want to make column 2  called PN visible and column SN invisible. I tried to calculate this formula and putting it in Visibility-hidden formula section

IIF(INSTR(Join(Parameters!section.Value), "GCG") > 0 OR Parameters!section.Value(0) = "-1", false, true)


the above formula didn’t make that particular columns visible/invisible

Alternatively, I tried putting the formula in the XML file for the report.

<TableColumn> <Visibility> <Hidden>=IIF(INSTR(Join(Parameters!comp.Value), "GCG") > 0 OR Parameters!comp.Value(0) = "-1", false, true)</Hidden> </Visibility> <Width>1in</Width> </TableColumn>

The above formula seems to be working, but the problem is when I export the report to the Excel. The column that I am making visible by the above formula is not exported to excel.

 

I am not sure what am I doing wrong, but I am struggling with this issue for past two days.

The value in the @section parameter can be “GCG” or “GED” or “PED” or all three of them “GCG”,”GED”, “PED” or two of them “GCG”, “PED”, it can be any combination. If I am passing the combination of two parameters then I want two columns to be visible and other invisible.

any help or hint will be greatly appreciated. I am struggling for a while with this issue.




 


Viewing all articles
Browse latest Browse all 1418

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>