The code listed below details change to the SysReportRun class which causes the progress bar to display for reports called from menu items. This HAS NOT BEEN TESTED thoroughly,
Edit: No longer overriding the send method, due to the potential to cause problems with the _newPageBeforeBody parameter. Instead, adding to the buildPrintRange method, seems to be called once per page on the reports I've tested with.
----Begin Code----
class SysReportRun extends ReportRun
{
...
Object ProgressForm; // Added
...
}
void run(boolean onlyReport = false)
{
...
if (runBaseReport.prompt())
{
ProgressForm = this.createProgressForm(); // Added
ProgressForm.init(); // Added
ProgressForm.setNames(this.design().caption(),
this.printerPrinterName()); // Added
runBaseReport.run();
}
...
}
// Start - Override send method and modify as shown
public boolean send(Common _cursor, int _level=1, boolean _triggerOffBody=TRUE, boolean _newPageBeforeBody=FALSE)
{
boolean ret;
if (ProgressForm) // Added
ProgressForm.setPagePercent(this.page(),100); // Added
ret = super(_cursor, _level, _triggerOffBody);
return ret;
}
// End - Override send method and modify as shown
private void buildPrintRanges()
{
...
if (ProgressForm) // Added
ProgressForm.setPagePercent(this.page(),100); // Added
...
}
----End Code----
Edit: No longer overriding the send method, due to the potential to cause problems with the _newPageBeforeBody parameter. Instead, adding to the buildPrintRange method, seems to be called once per page on the reports I've tested with.
----Begin Code----
class SysReportRun extends ReportRun
{
...
Object ProgressForm; // Added
...
}
void run(boolean onlyReport = false)
{
...
if (runBaseReport.prompt())
{
ProgressForm = this.createProgressForm(); // Added
ProgressForm.init(); // Added
ProgressForm.setNames(this.design().caption(),
this.printerPrinterName()); // Added
runBaseReport.run();
}
...
}
public boolean send(Common _cursor, int _level=1, boolean _triggerOffBody=TRUE, boolean _newPageBeforeBody=FALSE)
{
boolean ret;
ProgressForm.setPagePercent(this.page(),100); // Added
return ret;
}
// End - Override send method and modify as shown
private void buildPrintRanges()
{
...
if (ProgressForm) // Added
ProgressForm.setPagePercent(this.page(),100); // Added
...
}
----End Code----