programaticaly set Reportsoure of Sub-Sub Report

2 posts, 0 answers
  1. Lars
    Lars avatar
    22 posts
    Member since:
    Mar 2009

    Posted 01 Feb 2017 Link to this post

    Hi,

    i am facing a problem setting the reportsource of a Sub - Sub Report.

    I am trying it like this....

     

    using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(reportingPath + report_Name, settings))
    {
        Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
        ExportReport = (Telerik.Reporting.Report) xmlSerializer.Deserialize(xmlReader);
        if ((ExportReport != null))
        {
            ExportReport.ReportParameters["Id"].Value = Id;
     
            // Subreport for Column1
            if ((ExportReport.Items.Find("SubReport_Column1", true)).Count() == 1)
            {
                Telerik.Reporting.SubReport SubReport_Column1 = (Telerik.Reporting.SubReport) ExportReport.Items.Find("SubReport_Column1", true)[0];
                ((Telerik.Reporting.UriReportSource) (SubReport_Column1.ReportSource)).Uri = reportingPath + SubReport_Colum1_Name;
                             
                if ((SubReport_Column1.Items.Find("SubReport_Column1_Details", true)).Count() == 1)
                {
                    Telerik.Reporting.SubReport Report_SubReport_Column1_Details = (Telerik.Reporting.SubReport) SubReport_Column1_Details.Items.Find("Column1_Details", true)[0];
                    ((Telerik.Reporting.UriReportSource) (Report_SubReport_Column1_Details .ReportSource)).Uri = reportingPath + report_Column1_Details;
                }
            }
             
            ...

     

    Hope somebody can help me out?

    I am not sure, what is the right way to set the SubReport.URI of the SubReport.
        if ((SubReport_Column1.Items.Find("SubReport_Column1_Details", true)).Count() == 1)

     

     

     

     

  2. Lars
    Lars avatar
    22 posts
    Member since:
    Mar 2009

    Posted 01 Feb 2017 in reply to Lars Link to this post

    please delete this post, accidental the post was made to early....a second one it present.
Back to Top