Click here to Skip to main content
15,902,189 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I want to create a rdlc report with dynamic columns.I mean i want to let user to select columns that he want to view in his report.also my data is in a datatable.

how can i do that?
Is there an easier way if i use Crystal Report?
Posted

1 solution

One of the approaches is as follows:
a) Add the dataset and design the RDLC report with all required columns
b) Add one report boolean parameter per dynamic column
c) Right click on column in rdlc design mode and select Column Visibility
- Select "Show or Hide based on an expression" and select the report parameter
d) In code behind, use ReportViewer.LocaReport.SetParameters method to set the boolean parameter values, "true" to hide and "false" to show.

See if this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900