21 August 2020

how to print report for selected Record in D365FO & Running an SSRS report from the selected record D365 F&O

Running an SSRS report from the selected record

class TRGVendAccuredPurchaseController extends SrsReportRunController

{

    public static void Main(Args _args)

    {

        TRGVendAccuredPurchaseController::construct(_args).startOperation();

    }


    public static TRGVendAccuredPurchaseController construct(Args _args)

    {

        TRGVendAccuredPurchaseController controller = new TRGVendAccuredPurchaseController();

        controller.parmReportName(ssrsReportStr(TRGVendAccruedPurchases, Report));

        controller.parmArgs(_args);

        controller.parmLoadFromSysLastValue(false);

        return controller;

    }


    public void prePromptModifyContract()

    {

        FormRun formRun = this.parmArgs().caller();        

        ProjTable projtable = this.parmArgs().record();


        if((formRun) && (formRun.name() == Formstr(ProjTable) || formRun.name() == Formstr(ProjProjectsListPage)))

        {

            SrsReportHelper::addParameterValueRangeToQuery(this.getFirstQuery(),tableNum(PurchTable),fieldNum(PurchTable, ProjId),SysQuery::value(projtable.ProjId));

        }

        super();

    }


}

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...