Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

BeforePrint problem

edited June 2013 in Subreports
I am using templates to create a range of reports from a set of standard
subreports. I am using the following code to add them to a master report:-

dmJobDetails := TdmJobDetails.Create(Self,
ProjectManager.CurrentProject);
srJobDetails.Report.Template.FileName :=
TemplatePath + 'Structural\Reports\JobDetails.rtm';
srJobDetails.Report.Template.LoadFromFile;
srJobDetails.DataPipeline := dmJobDetails.jitJobDetails;
ppJobDetailsChildReport.Detail.BeforePrint :=
dmJobDetails.SupportedTrussesBeforePrint;

I am trying to modify the visibility or color of various subreport
labels bu assigning the BeforePrint event of srJobDetails (the local
empty subreport in the master report) to a handler in the dmJobDetails
module. This handler then sets different visibility etc for the
subreport loaded as a template. Although the event handler is called no
changes to the labels occur. This seems to be related to the fact that
the report is loading templates. Any suggestions as to what I am doing
wrong?

Comments

This discussion has been closed.