Running report from code

Hi,

im running report from code and gets stuck or wait too long becouse it tries to print all the records of production picking list - i need to print particular production picking list from code, it prints it all, where am i doing a mistake ???

static void Job27(Args _args)
{
        ProdJournalBOM                          reportRecord;
        SrsReportRunController             controller = new SrsReportRunController();
        SRSPrintDestinationSettings     settings;
        Args                                                 args = new Args();

        controller.parmReportName(ssrsReportStr(ProdPickList, Report));
        controller.parmExecutionMode(SysOperationExecutionMode::Synchronous);
        //  controller.parmShowDialog(false);

        select firstOnly * from reportRecord where reportRecord.ProdId == 'W049763';

        args.record(reportRecord);
       // args.parmEnum(PrintCopyOriginal::Original);
       // args.parmEnumType(enumNum(PrintCopyOriginal));

        controller.parmArgs(args);

        settings = controller.parmReportContract().parmPrintSettings();
        settings.printMediumType(SRSPrintMediumType::Screen);
        controller.startOperation();
}

Parents Reply Children
No Data
Related
Recommended