Pages

Banner 468 x 60px

 

Wednesday, November 22, 2017

Clicked using x++

0 comments
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");
        }
    }
}

0 comments:

A financial dimension value is based on the record and has been used on a transaction. You cannot delete the record

  SOLUTION delete in table DimensionAttributeLevelValue base on Bank Account  :  and Delete the Bank Account FINISH