none
Unable to programatically reference subreport property (EnableExternalImages) from main report RRS feed

  • Question

  • I have what i think is a unique requirement not addressed in other questions. I've developed a local report in Microsoft report designer as an rdlc and am viewing it via the report viewer control. The report contains a subreport. The subreport renders images from external files. The problem is that i need to programmatically set the EnableExternalImages property of the subreport at run time. Without this, the subreport refuses to render ("Error: Subreport could not be shown" is the error message i get). I've set this property on the main/outer report programatically without issue using this statement:

    Me.ReportViewer1.LocalReport.EnableExternalImages = True

    However i need to do the same on the sub-report...so optimally, i would like to code something like this:

    Me.ReportViewer1.LocalReport.Subreport1.EnableExternalImages = True.

    Problem is, i don't see a property available that provides me direct access to the subreport's properties in this fashion. I've looked into using the SubreportProcessingEvent, however this event only exposes a limited number of properties of the sub-report (Reportparamaters, Datasources, ReportPath, etc..), but does not provide me with access to all of it's properties (e.g. EnableExternalImages property).

    Thanks for any information...


    erl

    Thursday, January 17, 2013 1:42 AM

All replies