report

Deploy all SSRS reports ignoring errors

If you try to bulk-deploy the SSRS reports from any sources (AX, VS, PowerShell) and you are not using OLAP cubes with SSAS, the deployment will fail with the error message below. Feel free to use this job to deploy all SSRS reports ignoring errors.

Microsoft.ReportingServices.Diagnostics.Utilities.InvalidItemPathException: The path of the item ‘/DynamicsAX/’ is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash.

static void WIK_deploySSRSreports_SkipError(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();
    }
}

 

By |2016-09-05T16:23:17+02:00September 5th, 2016|Categories: AX 2012|Tags: , , , , |1 Comment

Image resources in reports

When I was playing around with images and resources in AX, I have found that Menu nodes have an AOT property called NormalImage. On this property you can provide a file name which was imported into AX under the Resource node, so your module would have this image shown in the Main menu.

But when you want to use the resource in a report, the kernel does not associate your custom image with a resource ID, and you also do not have a property similar to the menus.

The only solution that you have is to add a Bitmap control to your report, then read out the data that is being stored under the node and return the container as a Bitmap value. Here is the code:

(more…)

By |2015-11-23T17:56:58+01:00August 18th, 2010|Categories: AX 2009, AX 2012, Microsoft Dynamics AX|Tags: , , , , , , , |2 Comments
Go to Top