
If you have a report that takes a long time to complete you can consider running it in “batch mode”
To reach this result you must call the parmExecutionMode(SysOperationExecutionMode::ScheduledBatch) method in the main Method of the report controller class.
For example you can do this
public static void main(Args _args)
{
TaxReportController_IT controller = new TaxReportController_IT();
controller.parmReportName(ssrsReportStr(TaxReport_IT, Report));
controller.parmExecutionMode(SysOperationExecutionMode::ScheduledBatch); //This executes the report run in Batch mode
controller.parmArgs(_args);
controller.startOperation();
}
But pay attention!! This code forces the report to always run in batch mode
I prefer to parameterize the execution.
For example you can create a Menu item to call the report and passes a parameter to force the batch execution.
Something like that :
Set the parameter value of the menu item to “BatchExec“

and then add this code to the Main method of the Controller class
public static void main(Args _args)
{
TaxReportController_IT controller = new TaxReportController_IT();
controller.parmReportName(ssrsReportStr(TaxReport_IT, Report));
//Execution in batch mode
if (_args.parm() == 'BatchExec') //If Menu item parameter = BatchExec then the execution is in batch mode
{
controller.parmExecutionMode(SysOperationExecutionMode::ScheduledBatch);
}
controller.parmArgs(_args);
controller.startOperation();
}
I am fan of your blogs. Keep rocking
LikeLike