run();
The run method of the JadeReportWriterReport class runs the current report, using the parameter values specified in the set methods.
When the report is run, a call is made to the
The following example shows the use of the run method.
btnRun_click(btn: Button input) updating;
vars
jrep : JadeReportWriterReport;
strName, strProfile : String;
intOrient, intIndex : Integer;
begin
if lstReports.listIndex = -1 then
return;
endif;
strName := lstReports.itemText[lstReports.listIndex];
jrep := myJWRM.getReport(strName);
if jrep = null then
return;
endif;
if chkOrientation.value then
intOrient := Print_Landscape;
else
intOrient := Print_Portrait;
endif;
intIndex := lstProfiles.listIndex;
if lstProfiles.listIndex = -1 and lstProfiles.listCount > 0 then
intIndex := 1;
endif;
if intIndex > 0 then
strProfile := lstProfiles.itemText[intIndex];
jrep.setProfile(strProfile);
endif;
jrep.setPreviewOptions(chkPreview.value, true, false, false, "Printing "
& strName);
jrep.setPageOptions(Print_A4, intOrient, 1, 0, 0, 10, 10, 0, false, 1);
jrep.run;
epilog
delete jrep;
end;