Monday, January 16, 2017

Deploy SSRS Report in X++ ax 2012

static void DeploySSRSreportsAx2012(Args _args)
{
    #AOT   
    TreeNodeIterator        reportIterator = TreeNode::findNode(#SSRSReportsPath).AOTiterator();
    SRSReportManager        srsReportManager = new SRSReportManager();
    SSRSReportConceptNode   ssrsReportConceptNode;
   
    if (!reportIterator)
        return;
   
    ssrsReportConceptNode = reportIterator.next();
    while (ssrsReportConceptNode)
    {
        try
        {
            srsReportManager.deploymentStart();
            srsReportManager.deployReport(ssrsReportConceptNode);
            srsReportManager.deploymentEnd();
        }
        catch
        {
            exceptionTextFallThrough();
        }
       
        ssrsReportConceptNode = reportIterator.next();
    }
}

No comments:

Post a Comment