Dynamics AX Blog - Dynamics AX 2012 - Posts from June 2019
These posts are machine-translated.
Currently, only posts are displayed, which are relevant for Dynamics AX version »Dynamics AX 2012« 
RSS-Feed of this version

RSS-Feed of this version
|
|
|
|
|
|
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"); } }