Business Requirement: printing ranges on a report
Printing the ranges with which a Report has been executed is only available for a AutoDesignSpecs Design of a Report.
Unfortunately this option is not available for Reports having a Generated Design.
Solution: override executeSection method in PageHeader
You can print the ranges with some X++ code modifications in your report.
- Add a PageHeader control to the Report, if there isn’t yet such a control in your Report.
- Override the executeSection method of the PageHeader control as follows:
public void executeSection()
{
// BGN Printing ranges
SysReportRun locSysReportRun;
;
//END
super();
// BGN Printing ranges
locSysReportRun = element;
locSysReportRun.printRanges(true);
SysReportRun::executePrintRangeSection(element);
// END
}
Post a Comment