Click here to Skip to main content
15,909,546 members

Comments by Willie Moore (Top 2 by date)

Willie Moore 9-Nov-11 11:00am View    
Deleted
The SubReportEventHandler is called for each subreport. Here is how I handle the issue.
METHOD SubReportEventHandler(sender AS OBJECT,
e AS SubreportProcessingEventArgs) AS VOID
LOCAL oDS AS ReportDataSource
LOCAL table AS datatable
LOCAL cReport as String
cReport := e:ReportName
DO CASE
Case cReport == "SubReport1"
table := SELF:oDataLayer:GetCLOGGC()
Case cReport == "SubReport2"
table := SELF:oDataLayer:GetCLOGDeductions()
END Case
// fill table here with the appropriate data
oDS := ReportDataSource{"SFMSales",Table}
e:DataSources:Add(oDS)
RETURN
Willie Moore 9-Nov-11 8:56am View    
Deleted
When you are in the SubReportEventHandler event, look at e.ReportPath. That will give you the subreport that caused the event to be fired.