Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
iam working on asp.net website vs 2010 & sql 2008

i have some reports for employees
but i hvae notice that evry afew days some body ask for differnet report
for example --> code-name -birth date -join date
another one ask for -->code- name -job-department .......

& some times they ask for different orders of columns

so my idea was to make page that contain all the column that users may need
then user choose the columns he need to dir in the report & the dir order
so if u have any idea on that please help me
Posted

1 solution

You're going to need to do the following:
1. provide a list of columns to the user to let them choose which ones they want to see and in which order;
2. Build an SQL statement using the columns selected;
3. Create a dataset containing one datatable to contain the required data;
4. Fill the datatable using the SQL command from 2;
5. Pass the dataset/datatable to the report;
6. Show the report
 
Share this answer
 
Comments
[no name] 3-Mar-12 23:13pm    
ok this is mean i must have rdlc report with fixed columns
but i need to make dynamic one
& what about the problem of columns orders
richardw48 4-Mar-12 3:08am    
The .rdlc file contains the report definition in XML format, so in order to modify the order or visibility of the columns you will need to edit this file directly. Open the rdlc file in NotePad++ or any other XML editor to examine its structure. You can use the HIDDEN tag to hide a column and you can also define the fields and columns. It's not easy but it is possible.

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