Report Builder 3.0 - Show or Hide computed columns dynamically
I built the report and added some calculated fields. I dropped these fields into columns but i want to hide the column, depending on what the user chooses from various prompts. Trouble is that I can't figure out how to refer to the columns where my calculated fields are, and show or hide them as per user request. I can hide the data properly, but not the physical column on the report. Bottom line, I can show or hide columns based on the fields in the dataset but not calculated fields. Any help is appreciated. Steven David Taub
July 11th, 2011 8:35pm

Hi stfromli, Thanks for your question. Based on your description, my understanding is that there are many calculated fields in the T-SQL query, although you had bind these columns into the report data region, you would like to hidden them, so the actual requirement is that you couldn’t figure out which columns are the calculated columns, besides, how to hidden the columns based on the different users’ request, right? If I misunderstand your question, please don’t hesitate to let me know. Actually, I have one misunderstanding about the per user request, do you mean that for different user, you calculated different columns, or your meaning is that you allow the user choose columns then displaying the selected columns. If in the first case, I think it is hard to achieve the target, because there would be many dynamic T-SQL queries. If in the second case, there would be one workaround. For the calculated columns, there must be an alias for them, so you can create one parameter to store the column names. The user checked the column names that they would display in the data region, you using join function to join the checked column names, then comparing this joined string to the column header to control the column’s visibility. I had handled a similar thread, the detail steps please refer to: http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/08705762-10e2-468c-8d39-b70098e65a62. Hope it helps you. If you have any other question, please feel free to let me know. Thanks, Sharp Wang Please remember to mark the replies as answers if they help you and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2011 4:12am

Thanks Sharp! Everything I need to do i can do for the fields that I get from the dataset. But when it comes to computed columns such as grouped fields, I can't seem to change the column structure to make it hide and remove the white space or even increase the size of the fields next to them. There seems to be limited information on this area. I'll take a look at your post and see if that link helps. Being new to report builder 3.0 I have alot to learn. Here's a new question. one of my grouping fields contains different amount of blanks on left side or right side of the value (ex. 12345 is different then <sp>12235<sp>. As a result when the report is run, the report looks at these as different values. When I use the trim function it does remove the spaces in the report but still does not group them properly. Any ideas on how to solve this issue? Is this enough information for you to know what I'm trying to achieve?Steven David Taub
July 15th, 2011 5:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics