1
Answer

2010 visual studio: Parameter creation

Ask a question
David Smith

David Smith

14y
1.8k
1

How do you create a parameter in the rdlc file. I know how to do it in 2008. Its very simple in 2008. I have found a way.Basically what im trying to do is create a parameter for a particular textbox and then pass in a certain string.
string Textbox = "Cookies";
then in code i want to
public void SetEeventsInReportView(String Report, String textBox)
{
// Setup reportd dynamically
textBox = "Cookies";
this.reportViewer.Visible = true;
this.reportViewer.Reset();
this.reportViewer.LocalReport.ReportEmbeddedResource = "Cookie.Example.ReportGen.Report_" + Report + ".rdlc";
this.reportDataSource.Name = "GenericDataSet_Generic_Datatable";
this.reportDataSource.Value = this.Generic_DatatableBindingSource;
this.EdescriptionParameter = new ReportParameter("EdescriptionTitle", texBox);
this.reportViewer.LocalReport.SetParameters(new ReportParameter[] { titleParameter });
this.reportViewer.LocalReport.DataSources.Add(reportDataSource);
this.reportViewer.RefreshReport();
}
// GenerateReport()
---------------------------------------------
I havng problems creating the report in visual studio 2010, so can someone walk me through creating parameters in 2010 vs for rdlc file

Answers (1)