[ ax2012 ] create batch

menu item > class that extends RunBaseBatch

Example when click menu

รูปภาพ

main method

static void  main(Args  args)
{
    ClassNameNaja classNameNaja;
    ;

    classNameNaja = new ClassNameNaja();

    if(classNameNaja .prompt())
    {
        classNameNaja .run();
    }
}

 run method

[ ax2012 ] call new report using SrsReportRun

#define.reportName('ReportNameNaja.Report')
    srsReportRun = new SrsReportRun (#reportName);
    srsReportRun.init();
    srsReportRun.reportCaption('This is a caption');
    // passing report parameter
    srsReportRun.reportParameter('ParameterNameSendToReport').value(ParameterNameSendToReportValueNaja);
    // set new file path to print settings
    srsPrintDestinationSettings.fileName(newfilePath);
    srsReportRun.printDestinationSettings(srsPrintDestinationSettings);
    // execute report
    srsReportRun.executeReport();