show or hide based on report parameters in ssrs 2008
Hi!
I am trying to show or hide based on report parameters in ssrs 2008.
For this I used an Expression
=IIF(INSTR(Join(Parameters!param_Salary.Value),"TPT")>0,false,true)
WHERE "TPT" is the name of Column and param_salary is the name of parameter.
I heve set this expression for all columns and its working fine accept two columns ("TPT","TPTARR").
Observation Found during RND for these two rows
1. When "TPT" is unselected in report parameters, system is not hiding the column "TPT".
2.When "TPTARR" and "TPT" both is unselected in report parameters, system is hiding the column "TPT" and "TPTARR" both.
3.When "TPTARR" is unselected in report parameters, system is hiding the column "TPT".
4.I Verified carefully all the details properties of columns. There is no issues in columns properties.
5. If I changed the Name of column "TPT" to ("ABCD" or "TPTALL"...) and report parameter accordinglly. It's working Fine.
Finally From My Side Its decleared that its a bug in SSRS.
If anybody faced the same problem then please share.
For Any Query contact me on vikash31@gmail.com
June 26th, 2012 3:31am
Hi There
Thanks for your posting. I would say that this is expected behaviour, Why do you think that this is a bug, you can see that TPT is a part of TPTARR as soon as it find TPT it triggered
and set the value to true
Please elaborate further why you would think that this is a bug.
I will look forward to hear from you soon
If you have any question please do ask
Many thanks
Syed Qazafi Anjum
Free Windows Admin Tool Kit Click here and download it now
June 26th, 2012 4:33am
Dear
I am not agree with you.
Suppose that I want to hide the TPT column only.
Below is the condition
1. two column with name "TPT" and "TPTARR"
2. On the basis of report parameter I want to select any one of the column at a time(Either column "TPT" or "TPTARR").
3. You just give me expression to hide "TPT" column on basis of report parameter
[I am using expression
=IIF(INSTR(Join(Parameters!param_Salary.Value),"TPT")>0,false,true)]
Above expression is working for all columns except "TPT" column.. ..
3. Please give me expression if you are not satisfied. or you find something wrong is written.
4. If I take two column differentlly (ie column "TPTALL" and "TPTARR") then its working fine.
June 26th, 2012 7:51am
I am giving you one more example
1. Report parameter is showing two values. One is "GPF" and other is "GPFARR".
2.On the bases of report parameter, i want to view/hide the both column defined in report parameter.
Observation
a. On "GPF" unselect on Report parameter" system is not hiding "GPF" column.
But on "GPFARR" unselect system is hiding both "GPF" and "GPFARR" column
I want to hide column "GPF" when user unselect the "GPF" report parameter(Dropdown shows all the column of the report.).
If I change the name of column differentlly. Its working fine.
May be i am wrong. Please give me solution.
thanks
Vikash Srivastava
Free Windows Admin Tool Kit Click here and download it now
June 26th, 2012 8:01am
Hi Vikash,
When we set the column visibility based on the following expression =IIF(INSTR(Join(Parameters!param_Salary.Value),"TPT")>0,false,true), if the user selects any value that contains the TPT characters for the parameter, the TPT column will be visible.
So, as Syed posted above, it is not a bug; on the contrary, it behaviors exactly.
Based on your scenario, you can work around the issue by modifying the parameter available values and the column visibility expression. Please refer to the steps below:
Open the Report Parameter Properties window of the param_Salary parameter.Click the Available Values, select Specify values and add the following values:
Label: GPF
Value: ABCD
Label: GPFARR Value: GPFARRModify the column visibility expression of the GPF column as follows:
=IIF(INSTR(Join(Parameters!param_Salary.Value),"ABCD")>0,false,true)
If you have any questions, please feel free to let me know.
Regards,
Mike Yin
July 2nd, 2012 4:35am
Hi Vikash,
When we set the column visibility based on the following expression =IIF(INSTR(Join(Parameters!param_Salary.Value),"TPT")>0,false,true), if the user selects any value that contains the TPT characters for the parameter, the TPT column will be visible.
So, as Syed posted above, it is not a bug; on the contrary, it behaviors exactly.
Based on your scenario, you can work around the issue by modifying the parameter available values and the column visibility expression. Please refer to the steps below:
Open the Report Parameter Properties window of the param_Salary parameter.Click the Available Values, select Specify values and add the following values:
Label: GPF
Value: ABCD
Label: GPFARR Value: GPFARRModify the column visibility expression of the GPF column as follows:
=IIF(INSTR(Join(Parameters!param_Salary.Value),"ABCD")>0,false,true)
If you have any questions, please feel free to let me know.
Regards,
Mike Yin
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2012 4:35am
thanks!
July 6th, 2012 1:38am