Clicked using x++ :
void clicked()
{
SrsReportRunController reportRunController;
Map queryContracts;
MapEnumerator mapEnum;
Query query;
QueryBuildRange range;
SrsReportDataContract contract;
TECPurchaserReturnContract rdpContract;
if(PurchaseTable.PurchId)
{
reportRunController = new SrsReportRunController();
reportRunController.parmReportName(ssrsReportStr(PurcPurchaseReturnRDP ,PrecisionDesign1));
reportRunController.parmLoadFromSysLastValue(false);
// Set printer settings (print to file, format, filename, etc).
contract = reportRunController.parmReportContract();
// Use our custom-defined report contract class
rdpContract = contract.parmRdpContract() as TECPurchaserReturnContract;
//rdpContract.parmToDate(systemDateGet());
//rdpContract.parmIncludeVendorsWithoutTransactions(true);
queryContracts = contract.parmQueryContracts();
mapEnum = queryContracts.getEnumerator();
while(mapEnum.moveNext())
{
query = mapEnum.currentValue();
range = SysQuery::findOrCreateRange(query.dataSourceTable(tableNum(PurchTable)),fieldNum(PurchTable, purchId));
range.value(queryValue(PurchaseTable.PurchId));
}
reportRunController.runReport();
}
}
==================== ATAU ========================
Pada saat print purchase requistions report
void clicked()
{
Args args;
PurchReqTableVersion localPurchReqTableVersion;
for (
localPurchReqTableVersion = purchReqTableVersion_ds.getFirst(true) ?
purchReqTableVersion_ds.getFirst(true) : purchReqTableVersion_ds.cursor(); localPurchReqTableVersion;
localPurchReqTableVersion = purchReqTableVersion_ds.getNext()
)
{
if(localPurchReqTableVersion.PurchReqTable)
{
args = new Args();
args.record(localPurchReqTableVersion);
new MenuFunction(menuitemOutputStr(PurchReqController), MenuItemType::Output).run(args);
}
else
{
throw error("@SYS26348");
}
}
}
void clicked()
{
SrsReportRunController reportRunController;
Map queryContracts;
MapEnumerator mapEnum;
Query query;
QueryBuildRange range;
SrsReportDataContract contract;
TECPurchaserReturnContract rdpContract;
if(PurchaseTable.PurchId)
{
reportRunController = new SrsReportRunController();
reportRunController.parmReportName(ssrsReportStr(PurcPurchaseReturnRDP ,PrecisionDesign1));
reportRunController.parmLoadFromSysLastValue(false);
// Set printer settings (print to file, format, filename, etc).
contract = reportRunController.parmReportContract();
// Use our custom-defined report contract class
rdpContract = contract.parmRdpContract() as TECPurchaserReturnContract;
//rdpContract.parmToDate(systemDateGet());
//rdpContract.parmIncludeVendorsWithoutTransactions(true);
queryContracts = contract.parmQueryContracts();
mapEnum = queryContracts.getEnumerator();
while(mapEnum.moveNext())
{
query = mapEnum.currentValue();
range = SysQuery::findOrCreateRange(query.dataSourceTable(tableNum(PurchTable)),fieldNum(PurchTable, purchId));
range.value(queryValue(PurchaseTable.PurchId));
}
reportRunController.runReport();
}
}
==================== ATAU ========================
Pada saat print purchase requistions report
void clicked()
{
Args args;
PurchReqTableVersion localPurchReqTableVersion;
for (
localPurchReqTableVersion = purchReqTableVersion_ds.getFirst(true) ?
purchReqTableVersion_ds.getFirst(true) : purchReqTableVersion_ds.cursor(); localPurchReqTableVersion;
localPurchReqTableVersion = purchReqTableVersion_ds.getNext()
)
{
if(localPurchReqTableVersion.PurchReqTable)
{
args = new Args();
args.record(localPurchReqTableVersion);
new MenuFunction(menuitemOutputStr(PurchReqController), MenuItemType::Output).run(args);
}
else
{
throw error("@SYS26348");
}
}
}
0 comments:
Post a Comment