Hi again Patrick,

funny problem. What you are trying to do is not possible -> to 
choose design at the time fetch() is executed. At this time the 
design is created. Fetch() is only to fetch data for the choosen 
design.

I am not sure this is the best way to solve your problem. But, have 
you considered creating a class where you create two reportRun 
objects - one for each of your designs. Again, I am not sure this is 
the best way, but I think could work.

I have just created a small job to test my point:

static void ExecuteReportDesignSilent(Args _args)
{
    Args args;
    SysReportRun reportRun1;
    SysReportRun reportRun2;

    ;
    args = new Args();
    args.name(reportstr(xmc_ADS_side9_alt1_2));

    reportRun2 = classFactory.reportRunClass(args);
    reportRun2.query().interactive(false);
    reportRun2.report().interactive(false);
    reportRun2.setTarget(PrintMedium::Screen);
    reportRun2.design("RepEmpty");
    reportRun2.run();

    reportRun1 = classFactory.reportRunClass(args);
    reportRun1.query().interactive(false);
    reportRun1.report().interactive(false);
    reportRun1.setTarget(PrintMedium::Screen);
    reportRun1.design("RepGroupTotal");
    reportRun1.run();
}

Best regards
Lars




Reply via email to