Dynamics AX Blog - Posts from Juni 2019

These posts are machine-translated.
Currently, only posts from »Juni 2019« are displayed Filter entfernen

Debugging SSRS-Dataprovider which extends SrsReportDataProviderPreProce

In Debugging SSRS-Dataprovider I have already described how to "debug" a DataProvider derived from SRSReportDataProviderBase.

The following job basically does the same, but for preprocessed reports, where the DataProvider is derived from SrsReportDataProviderPreProcess. In the example, I use the DataProvider of an invoice (SalesInvoice).

static void testSSRSDataProvider_SalesInvoice(Args _args)
{
    SalesInvoiceTmp salesInvoiceTmp;
    SalesInvoiceDP dataProvider = new SalesInvoiceDP();
    SalesInvoiceContract contract;
    CustInvoiceJour CustInvoiceJour = CustInvoiceJour::findRecId(35637191172);
    UserConnection UserConnection;

    try
    {
        ttsBegin;

        UserConnection = new UserConnection();

        contract = new SalesInvoiceContract();
        contract.parmFormLetterRecordId(CustInvoiceJour.RecId);
        contract.parmRecordId(CustInvoiceJour.RecId);

        dataProvider = new SalesInvoiceDP();
        dataProvider.parmDataContract(contract);
        dataProvider.parmUserConnection(UserConnection);
        dataProvider.processReport();

        salesInvoiceTmp = dataProvider.getSalesInvoiceTmp();
        
        while select salesInvoiceTmp
            where SalesInvoiceTmp.createdTransactionId == appl.curTransactionId()
        {
            info(strFmt("%1 %2", SalesInvoiceTmp.InvoiceId, SalesInvoiceTmp.ItemId));
        }

        ttsCommit;
    }
    catch (Exception::Break)
    {
        info("Aborted");
    }
}

 


 
 
 

 

 
 
 
Posts of the actual month
Juni 2019
MoTuWeThFrSaSu
 12
3456789
10111213141516
17181920212223
24252627282930
 
© 2006-2024 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.