May 27, 2008 at 12:33 pm
I am new to SQL Server 2005 and have been requested to complete a project. I am almost there but, one thing still eludes me and that is, is there a way to allow the user to select the columns they would like to display on the report?
Any comments would be a great help.
Thanks
May 27, 2008 at 1:16 pm
Hi,
Can you please tell us your exact requirement
If there is a table with 5 columns.
Do you want to display the 5 column names in checkbox list and allow the user to select any number of them. And we should display all the values in selected columns ??
Is it the way you are expecting ???
May 27, 2008 at 1:57 pm
harish_ravi (5/27/2008)
Hi,Can you please tell us your exact requirement
If there is a table with 5 columns.
Do you want to display the 5 column names in checkbox list and allow the user to select any number of them. And we should display all the values in selected columns ??
Is it the way you are expecting ???
That is exactly what i am hoping for, thanks!
May 27, 2008 at 2:00 pm
You need to create a report model, with the columns you want to make available, the relations between tables, etc.... and then give you end-users access to the Report Designer (through the web interface).
The report designer will use what is in the model you create to give your users limited access to data they can report on.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
May 27, 2008 at 2:26 pm
You could also do exactly what was said, add parameters for the columns they can enable or disable and toggle the visibility of the columns with the parameters.
Even a bit more slick, you can use a toggle item in the report itself allow the expand / collapse buttons and toggle the visibility of the column after report execution. This would allow the user to show or hide columns without re-running the report.
May 27, 2008 at 2:53 pm
Can i do this with SQL Server Express as i don't have the developer edition and don't have report model. Also would this require a little code behind, to set the .isMissing boolean? I am kinda looking at this and not sure how to approach the parametered columns.
May 28, 2008 at 12:14 pm
Michael Earl (5/27/2008)
You could also do exactly what was said, add parameters for the columns they can enable or disable and toggle the visibility of the columns with the parameters.Even a bit more slick, you can use a toggle item in the report itself allow the expand / collapse buttons and toggle the visibility of the column after report execution. This would allow the user to show or hide columns without re-running the report.
In this explanation would i need to make a parameter for each column? I cannot just do one drop down box. I have been trynig this but i am not sure how about to get the column names. I tried by making a second data set called Column_Names but when i use it as a parameter to choose which columns to display i get an [rsFieldReference] error
May 28, 2008 at 1:30 pm
If you have just a dropdown box, wouldn't you only be able to choose a single field? You would be able to do this with a multi-value combobox, but I cannot explain in a post.
I think you need to start with the toggle items and see if the users will be ok with it. This is the simplest solution. Start with one column.
Drop an extra textbox onto your report above the data grid.
Change the text of the textbox to the name of the column you want to toggle.
Change the name of the textbox to txt
Highlight the column in your data grid and change the visibility toggle item to the textbox you just created (txt )
When the report is rendered, the new textbox will have a toggle item in it (+/-). When you click it, it will hide or display the column in the grid.
May 28, 2008 at 4:41 pm
Michael,
I finally understand what you were directing me to. Thanks alot, that gives me the functionality i was looking for.
Thanks!
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply