ActiveReports nested subreport rendering resulting in error

Posted by Christopher Klein on Stack Overflow See other posts from Stack Overflow or by Christopher Klein
Published on 2010-06-06T23:35:56Z Indexed on 2010/06/06 23:42 UTC
Read the original article Hit count: 583

Filed under:
|

I'm having a problem with an ActiveReports(3.0) report which contains nested subreports.

The problem is that the child/grandchild subreports are rendering before their predecessor has completed rendering so the XMLDataSource cannot be set properly. It seems to be a purely timing issue has occassionally if I am debugging the report in Visual Studio and stepping through the code the report will generate but mostly I get an error message: "FileURL not set or empty"

The FileURL is supposed to be empty has we are dynamically loading the XML to the report.

The structure of the report is:

Parent

Child1
Child2

    GrandChild2-1
    GrandChild2-2

I found one solution going back to 2004 on Data Dynamics website that you basically have to force the subreports to look at the parent.

((DataDynamics.ActiveReports.DataSources.XMLDataSource) subrpt.DataSource).FileURL 
=     ((DataDynamics.ActiveReports.DataSources.XMLDataSource) this.DataSource).FileURL;

This seemed to work for a while until I took out all my breakpoints and tried to run it and now it just gives me the error message.

If anyone has ran across this or has any suggestions on getting around it, it would be greatly appreciated.

Running ActiveReports 5.3.1436.2

thanks,

Chris

© Stack Overflow or respective owner

Related posts about c#

Related posts about activereports