Doens.be

  • Linkedin flickr twitter delicious Facebook Youtube

Class RunBaseReport

When you create a class that extends from RunBaseReport and you try to modify the printer preferences it won’t have any effect. This small bug can be fixed very easy.

Edit the class RunBaseReportDialog, method main and check lines 14 and 15:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
static void main(Args args)
{
    RunBaseReportDialog reportDialog = new RunBaseReportDialog(args.caller());
    RunBaseReport runBaseReport = args.caller().runbase();
    ReportRun reportRun = runBaseReport.reportRun();
    Report report = reportRun.report();
    boolean oldInteractive;
    boolean res;
    Dialog dialog;
    ;
    // We must invoke the SysPrintForm via the report object so that we honor an prompt overrides.
    oldInteractive = report.interactive();
    report.interactive(true);
    //res = reportRun.prompt(); // COMMENTED
    res = reportDialog.prompt(); // CHANGE OF CODE
    report.interactive(oldInteractive);
    if (!res)
        return;
    dialog = Dialog::getDialogFromCaller(args.caller());
    if (dialog)
    {
        dialog.updateServer();
    }
    runBaseReport.dialogUpdatePrinterSettings(dialog);
    reportDialog.run();
}

Tags: , , , ,

2 Responses to “Class RunBaseReport”

  1. December 8th, 2009 at 08:30

    Jonas says:

    Thanks a lot for this post.

    /Jonas

  2. April 12th, 2010 at 17:34

    Rodolfo Sanchez says:

    excellent. I was looking for this. Thanks

Leave a Reply