This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
Dynamics AX 2012
|
|
|
|
|
|
|
This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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"); } }