2012年10月29日星期一

How to using code deploy SSRS Reports to AX 2012



Following code can be used to deploy SSRS reports in Ax 2012.
However make sure that this code runs from the client, and not as CIL (otherwise you will get run time errors)
I can run this below code as a job and works fine.


please Note : This code will only work in AX 2012 as in AX 2009/4.0/3.0 there were no SSRSReport Classes.

static void THK_deploySSRSReportDemo(Args _args)
{
    SSRSReportManager       mgr = new SSRSReportManager();
    SSRSReportConceptNode   node = new SSRSReportConceptNode();
;
    node=TreeNode::findNode(@"\\SSRS Reports\Reports\SalesInvoice");
    mgr.deploymentStart();
    mgr.deployReport(node);
    mgr.deploymentEnd();
}

没有评论:

发表评论