Pages

Banner 468 x 60px

 

Monday, March 27, 2017

Call non AX reports on SSRS in AX 2012

0 comments
There are scenarios, that report generated in SQL Reporting Builder, or Visual Studio that are completely not working with AX SSRS reporting integrations. Examples like reports that use non AX data or, are simply to complex building it in AX. But it would be nice to have these reports integrated in the Menu Structure of AX. Even some authorization on top of it would be nice.
So how can we glue a menu item to an SSRS report that does not belong to AX. The trick is using a class. The main method of this class should look like this :
class CallSSRS
{
}

public static void main(Args args)
{
    #define.reportName('Report1')
    SRSServers                      srsServers;
    SRSReportServerConfiguration    reportServerConfiguration;
    select firstOnly srsServers where srsServers.IsDefaultReportLibraryServer;
    reportServerConfiguration =   SrsFrameworkServiceHelper::createSRSReportServerConfiguration(srsServers);
    if(websession())
    {        websession().redirectURL(reportServerConfiguration.reportManagerURL()+'/Pages/Report.aspx?ItemPath=/'+   reportServerConfiguration.reportFolder() +'/'+#reportName);
    }
    else
    {        infoLog.urlLookup(reportServerConfiguration.reportManagerURL()+'/Pages/Report.aspx?ItemPath=/'+   reportServerConfiguration.reportFolder() +'/'+#reportName);
    }
}
You could add a menu item Action to it and use this menu item on the menu.
So will this work ; Yes. But you have to deal with security on SQL yourself. In case the class is running client site it is with the current user security, is it running server site, it is with the service account of the AOS.


0 comments:

A financial dimension value is based on the record and has been used on a transaction. You cannot delete the record

  SOLUTION delete in table DimensionAttributeLevelValue base on Bank Account  :  and Delete the Bank Account FINISH