whats up guys a found a way to fix my problem was fooling around and an idea came to me and tested and whalla it worked so here is what i did
step 1
create a dataset with a table that has all the possible columns that you might use in your report
step 2
add all of these columns to your report
step 3
create report parameters for all the columns u want to hide / un-hide
step 4
assign the value of the hidden property for each column to evaluate whether or not to set hidden property to true or false
example set hidden property to
Code:
=iif(Parameters!param_TicketId.Value="T",True,False)
step 5
assign values to the report parameters wherever you are going to build and run the report
Code:
ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report.rdlc");
ReportDataSource rds = new ReportDataSource();
rds.Name = "spTroubleTicket_AllTableAdapter";
rds.Value = dsReport.Tables[0];
ReportViewer1.LocalReport.DataSources.Add(rds);
ReportParameter[] param = new ReportParameter[2];
param[0] = new ReportParameter("param_TicketId", "F");
param[1] = new ReportParameter("param_TimeRecieved", "T");
ReportViewer1.LocalReport.SetParameters(param);
ReportViewer1.LocalReport.Refresh();
you can do any manipulation you want based on the code above my original code i allowed my users to select the column the wanted to be in the report. and i also allowed them to generate the dataset based on the specific search criteria they chose to use and use this as the dataset.
so in essence i create a data table with all possible columns and added it to my report and then allowed user to hide and unhide columns and generate there dataset to be used on the report dynamically
-EDIT- any questions be free to ask