//Running the report via code WO controller
static void ReportRunCheck(Args _args)
{
SrsReportRunController reportRunController;
Map queryContracts;
MapEnumerator mapEnum;
Query query;
QueryBuildRange range;
SrsReportDataContract contract;
FCCPaySlipContract rdpContract;
FilePath outputPath = "c:\\";
;
reportRunController = new SrsReportRunController();
reportRunController.parmReportName('FCCPAYLIP.Report');
reportRunController.parmLoadFromSysLastValue(false);
contract = reportRunController.parmReportContract();
contract.parmPrintSettings().printMediumType(SRSPrintMediumType::File);
contract.parmPrintSettings().overwriteFile(true);
contract.parmPrintSettings().fileFormat(SRSReportFileFormat::XML);
contract.parmPrintSettings().fileName(outputPath + "Payslip.xml");
rdpContract = contract.parmRdpContract() as FCCPaySlipContract;
rdpContract.parmEmployeeId("2005");
rdpContract.parmPayMonth(mkDate(01,06,2016));
//queryContracts = contract.parmQueryContracts();
//mapEnum = queryContracts.getEnumerator();
//while(mapEnum.moveNext())
//{
//query = mapEnum.currentValue();
//range = SysQuery::findOrCreateRange(query.dataSourceTable(tableNum(VendTable)),fieldNum(VendTable,AccountNum));
//range.value('3*');
//}
reportRunController.runReport();
}
static void ReportRunCheck(Args _args)
{
SrsReportRunController reportRunController;
Map queryContracts;
MapEnumerator mapEnum;
Query query;
QueryBuildRange range;
SrsReportDataContract contract;
FCCPaySlipContract rdpContract;
FilePath outputPath = "c:\\";
;
reportRunController = new SrsReportRunController();
reportRunController.parmReportName('FCCPAYLIP.Report');
reportRunController.parmLoadFromSysLastValue(false);
contract = reportRunController.parmReportContract();
contract.parmPrintSettings().printMediumType(SRSPrintMediumType::File);
contract.parmPrintSettings().overwriteFile(true);
contract.parmPrintSettings().fileFormat(SRSReportFileFormat::XML);
contract.parmPrintSettings().fileName(outputPath + "Payslip.xml");
rdpContract = contract.parmRdpContract() as FCCPaySlipContract;
rdpContract.parmEmployeeId("2005");
rdpContract.parmPayMonth(mkDate(01,06,2016));
//queryContracts = contract.parmQueryContracts();
//mapEnum = queryContracts.getEnumerator();
//while(mapEnum.moveNext())
//{
//query = mapEnum.currentValue();
//range = SysQuery::findOrCreateRange(query.dataSourceTable(tableNum(VendTable)),fieldNum(VendTable,AccountNum));
//range.value('3*');
//}
reportRunController.runReport();
}
No comments:
Post a Comment