Dynamics AX Blog - ssrs - Posts from 2015

These posts are machine-translated.
Currently, only posts are displayed, which contain the tag »ssrs« Filter entfernen
Currently, only posts from »2015« are displayed

Debugging SSRS-Dataprovider

In the past i often had the problem, that i had to debug a dataprovider of a SSRS-Report, which could not be debugged using the well known Dynamics AX Debugger (for example because the dataprovider is executed only on server).

Therefore i created the below job (DataProvider has to extend SRSReportDataProviderBase), which only puts the content of the created (temporary) table to an simple infolog.

In the example the report "Work note" of the service module is used.

static void testSSRSDatProvider(Args _args)
{
    SMAWorkNoteTmp      tempTable;
    SMAWorkNoteDP       dataProvider = new SMAWorkNoteDP();
    SMAWorkNoteContract contract = new SMAWorkNoteContract();
    Query               query = new Query(identifierStr(SMAWorkNote));

    try
    {
        SysQuery::findOrCreateRange(
            query.dataSourceTable(
                tableNum(SMAServiceOrderTable)),
                fieldNum(SMAServiceOrderTable, ServiceOrderId)).value("00018");

        contract.parmItemConsumption(true);
        contract.parmItemRequirement(true);
        contract.parmExpense(true);
        contract.parmFee(true);
        contract.parmAdditionalNotes(true);
        contract.parmLineText(true);

        if( !contract.validate())
        {
            throw error(error::missingParameter(contract));    
        }

        dataProvider.parmDataContract(contract);
        dataProvider.parmQuery(query);
        dataProvider.processReport();

        tempTable = dataProvider.getSMAWorkNoteTmp();

        while select tempTable
        {
            info(tempTable.otServiceOrderId);
        }
    }
    catch (Exception::Break)
    {
        info("Aborted");
    }
}

 
 
 

 

 
 
 
Posts of the actual month
April 2015
MoTuWeThFrSaSu
 12345
6789101112
13141516171819
20212223242526
27282930 
 
© 2006-2025 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.