Saturday, 30 November 2013

SSRS Report Debug in AX2012

Recently I posted a question on "how to debug a Report Data Provider" in AX 2012: https://community.dynamics.com/product/ax/f/33/p/59930/110686.aspx#110686. This was back when we used Contoso Demo System.
A few months later, now on our own AX 2012 live system, i phased  the same issue but in a different situation. AX 2012 is running on a distributed environment with separated RDS, AOS and SQL Servers.
Unfortunately i was not able to get the Debugger hit the breakpoint, even doing everything on the AOS Server itself. Debugging Report Data Provider is different in the way that it is called via Service from SSRS.
With the support from Microsoft i actually found out that there is a much easier way to test if your Data Provider is working: Just create a test job for your Data Provider:
static void Job3(Args _args){
TmpABC tempTable;
InventABCDP dataProvider = new InventABCDP();
InventABCContract contract = new InventABCContract();
contract.parmABCModel(ABCModel::Link);
contract.parmCategoryA(10);
contract.parmCategoryC(20);
contract.parmCategoryB(70);
contract.parmInterest(2.5);

dataProvider.parmDataContract(contract);
dataProvider.processReport();
tempTable = dataProvider.getTmpABC();

while
 select tempTable
{
info(tempTable.ItemName);
}
}

No comments:

Post a Comment