This is a migrated thread and some comments may be shown as answers.

ReportViewer1.ReportSource is not working

1 Answer 51 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Saju Samuel
Top achievements
Rank 1
Saju Samuel asked on 30 Oct 2013, 03:28 PM
Hi telerik team:

I've just updated to new telerik report libraries and I've discovered that ReportSource property doesn't exist and I don't know how to bind the report as old way. This is the code:

  private void RunReport(DataTable dt)
    {
        Report report;
        XmlReaderSettings settings;
        XmlReader xmlReader;
        ReportXmlSerializer xmlSerializer;

        settings = new XmlReaderSettings();
        settings.IgnoreWhitespace = true;
        using (xmlReader = XmlReader.Create(Server.MapPath(@"SupervisoryExceptions.trdx"), settings))
        {
            xmlSerializer = new ReportXmlSerializer();
            report = (Report)xmlSerializer.Deserialize(xmlReader);
        }
        report.ReportParameters["pDatabase"].Value = "Test Searching";
        report.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Letter;
        report.DataSource = dt;

        // Use the InstanceReportSource to pass the report to the viewer for displaying
        Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource();
        reportSource.ReportDocument = report;

   //This is the line that doesn't compile
        reportViewer1.ReportSource = reportSource;
    }

1 Answer, 1 is accepted

Sort by
0
Saju Samuel
Top achievements
Rank 1
answered on 30 Oct 2013, 03:51 PM
It was a mine mistake, sorry guys.

Remove this ticket.

regards
Tags
General Discussions
Asked by
Saju Samuel
Top achievements
Rank 1
Answers by
Saju Samuel
Top achievements
Rank 1
Share this question
or