problem with ReportViewer.LocalReport.LoadReportDefinition() method

R

rave

Hi ,

i have used a techinque, in my case on the button click i have to
generate a report definition and load it using
LocalReport.LoadReportDefinition method.
for the first time it is giving the report correctly, it is giving
the same report even if the report definition changes (some of the
columns were removed)

i am stuckup with this, please help me.

code goes like this

rpvPrint.LocalReport.DataSources.Clear();

rpvPrint.LocalReport.Dispose();


StringReader sr = new StringReader(xd.OuterXml);

rpvPrint.LocalReport.LoadReportDefinition(sr);

sr.Close();

ReportParameter[] rp = new ReportParameter[1];

rp[0] = new ReportParameter("Heading", "Hi ---This Is Test Heading");

rpvPrint.LocalReport.SetParameters(rp);



ReportDataSource rds = new ReportDataSource("DataSet2", dt);

rpvPrint.LocalReport.DataSources.Add(rds);

rpvPrint.LocalReport.Refresh();



thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top