NavigateToReportAction DataSource not being set on server

2 posts, 0 answers
  1. KD
    KD avatar
    1 posts
    Member since:
    Jan 2015

    Posted 15 Jan 2015 Link to this post

    I have a NavigateToReportAction assigned to a TextBox in a GroupHeaderSection of my report. In the code I assign the DataSource of my ReportSouce to this.DataSource. This works locally but the SubReports is blank on the testing server.

    I am running an out-of-proc session. I made changes for other DataSource assignments to account for this but, no matter what I try, I can't seem to bind the NavigateToReportAction DataSource.

    Here's what I have right now:

    public ParentReport()
        ItemDataBinding += ReportDataBinding;
    public void ReportDataBinding(object sender, EventArgs e)
        var processingReport = (Telerik.Reporting.Processing.Report)sender;
        var report = (Telerik.Reporting.Report)processingReport.ItemDefinition;
        GroupHeaderArea2 = (Telerik.Reporting.GroupHeaderSection)report.Items.Find("GroupHeaderArea2", true)[0];
        GroupHeaderArea2.ItemDataBinding += AssignSubReportDataSource;
    public void AssignSubReportDataSource(object sender, EventArgs e)
        Telerik.Reporting.Processing.GroupSection groupSection = (Telerik.Reporting.Processing.GroupSection)sender;
        Telerik.Reporting.Processing.TextBox txtName = (Telerik.Reporting.Processing.TextBox)groupSection.ChildElements.Find("txtName", true)[0];
        NavigateToReportAction action = (NavigateToReportAction)((Telerik.Reporting.TextBox)txtName.ItemDefinition).Action;
        InstanceReportSource subReportSource = (InstanceReportSource)action.ReportSource;
        ((Telerik.Reporting.Report)subreportSource.ReportDocument).NeedDataSource += subReport_NeedDataSource;
    protected void subReport_NeedDataSource(object sender, EventArgs e)
        ((Telerik.Reporting.Processing.Report)sender).DataSource = this.DataSource;

    I have tried to use a Binding in my SubReport to assign the DataSource as suggested in:

    If anyone has any tips on how to do that properly that would be helpful. Any insight is appreciated as I have been working on this issue for a while. Again, this is working locally, but not on the server.

  2. Hinata
    Hinata avatar
    146 posts
    Member since:
    Dec 2013

    Posted 20 Jan 2015 in reply to KD Link to this post

    Hi KD,

    Using events with out-proc session is a no go, because it is not correct to use report item definitions in the events. It is mentioned in the reporting documentation.
    Unfortunately, you will have to think about an entirely different approach, such as setting what you need to in the designer via expressions/bindings/etc.
Back to Top