Wednesday, December 31, 2014

Debug/Test SSRS report in AX 2012

People came across issues like report is not showing data on report or data is not per their expectation. It is really hard to judge where it goes wrong and what needs to be correct in which class RDP, Contract, UI or Controller.

Following sample job can be used to debug SSRS report processing data and lead to find what goes unexpected. For more information about classes and table used in this example please read my previous post

static void FF_ReportDPTest(Args _args)
{
    // temp table declaration
    FF_ReportTmpTable       ffReportTmp;
    // RDP class binded with FF_Report
    FF_ReportDP             dataProvider = new FF_ReportDP();
    // Contract class for report parameters
    FF_ReportContract       contract = new FF_ReportContract();
   
    // Parameters for reports   
    FreeText                companyName;
    CustAccount             customerAccount;
   
    // set parameters to contract class
    contract.parmCompany(companyName);
    contract.parmCustomerAccount(customerAccount);

    // set contract parameters to RDP class
    dataProvider.parmDataContract(contract);
   
    // call Data provider class to process report.
    dataProvider.processReport();
   
    // retrieve data from RDP class into temp table
    ffReportTmp = dataProvider.getFF_ReportReportTmp();

    // select data from temp table for testing purpose.   
    while select ffReportTmp
    {
        info(ffReportTmp.AccountNum);
    }

}

1 comment:

  1. Thanks for sharing, nice post! Post really provice useful information!

    Công ty vận chuyển hàng nước ngoài FadoExpress hàng đầu chuyên vận chuyển, chuyển phát nhanh siêu tốc đi khắp thế giới, nổi bật là dịch vụ gửi hàng đi mỹ, gửi hàng đi nhậtgửi hàng đi pháp và dịch vụ chuyển phát nhanh đi hàn quốc uy tín, giá rẻ

    ReplyDelete

I will appreciate your comments !

How to enable new Microsoft teams - Public Preview!

New Microsoft Teams is just AWESOME, quick but useful post below shows how you have this preview feature to make your life EASY!  Open Micr...