User-286235245 posted
Dear Friends,
My need is to generate Report using RDLC(Report Wizard) for Markslist of the student by giving the name of student. This scenario is working perfectly.
But my need is to add the TEXTBOX in Report Header that should generate the "Institution Name". I am new to this concept.
.CS Code is:
public void ShowReport()
{
ReportViewer1.Reset();
ReportDataSource rds = new ReportDataSource();
rds.DataSourceId = "ObjectDataSource1";
rds.Name = "DataSet1";
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.ReportPath = "C:\\inetpub\\wwwroot\\LocalReport01\\RegistrationReport.rdlc";
ReportViewer1.LocalReport.DataSources.Add(rds);
ObjectDataSource1.SelectParameters.Clear();
ObjectDataSource1.SelectParameters.Add("RPTGENDER", TextBox1 .Text);
ReportParameter[] param = new ReportParameter[1];
param[0] = new ReportParameter("RPTGENDER", TextBox1.Text);
ReportViewer1.LocalReport.SetParameters(param);
ReportViewer1.LocalReport.Refresh();
}
I dono how to achieve this. Can anyone please guide me to resolve this issue. Its a very Urgent one.