Setting up AX 2012 Reporting involves installing SQL Reporting Services and registering that Reporting Services installation in AX. One of the issues we were having is that we were seeing some problems deploying reports. In order to troubleshoot we tried the Test-AxReportServerConfiguration cmdlet.

This cmdlet was telling us: the report server URL accessible: False Hmm. That’s odd. We’re pretty sure that all involved URLs (Report Server Manager & Report Server Service) were properly resolving and responding. When double checking the AX Report Server configuration within the AX Client we tried the validate settings button:

However, we stumbled upon the following error:

In words: Exception has been thrown by the target of an invocation. The SQL Server Reporting Services server name RPRTAX1B.contoso.com does not exist or the Web service URL is not valid.
As it kept complaining about the URL I started to suspect what could be the root cause. From earlier experiences (Dynamics Ax 2012: Error Installing Enterprise Portal) I know that not all AX components can properly handle host headers. Because this is how our SQL Reporting Services host header configuration looks like for the Report Server URL:

Jup, we got multiple entries. The reason is somehow historical and not relevant here. It seems that AX, when validating the settings, checks whether the Report Server URL matches with the first host header in the SQL Reporting Services configuration. So I went ahead, removed all entries but the good one, ok-ed and applied. After that I re-added them. This ensured the URL AX knows of was on top of the list. And jup, everything started working!
A colleague from the AX team showed me which code was performing this check. Here’s the offending code:
public boolean queryWMIForSharePointIntegratedMode(str serverName, str _serverUrl)
{
boolean result = false;
try
{
result = Microsoft.Dynamics.AX.Framework.Reporting.Shared.Proxy::QueryWMIForSharePointIntegratedMode(serverName, _serverUrl);
}
catch (Exception::CLRError)
{
// We must trap CLRError explicitly, to be able to retrieve the CLR exception later (using CLRInterop::getLastException() )
SRSProxy::handleClrException(Exception::Error);
result = false;
}
return result;
}
And that’s how I come to part two. When creating Report Server configurations within AX, one might be wondering how to register a load balanced Reporting Services setup…
Here’s the configuration extract of the server name & URLs for such a configuration. Now how do we handle the fact that there’s 2 Servers and one (virtual) load balanced URL?

In a load balanced setup with 2 reporting servers you’ll typically have 3 configurations FOR EACH AOS instance:
- RSServerA(Default Configuration: unchecked)
- Server name: ServerA
- Report Manager URL: axreports.contoso.com/reports
- Web service URL: axreports.contoso.com/reportserver
- RSServer B (Default Configuration: unchecked)
- Server name: ServerA
- Report Manager URL: axreports.contoso.com/reports
- Web service URL: axreports.contoso.com/reportserver
- RSVirtualServer (the Load Balancer) (Default Configuration: checked)
- Server name: ServerA
- Report Manager URL: axreports.contoso.com/reports
- Web service URL: axreports.contoso.com/reportserver
Now the clue is in the server name: this is the name which is being used to contact the actual Windows server for certain information. Like in the code above, the server will be contacted over WMI to read the requested setting. If you were to enter “axreports.contoso.com” as a servername, you’ll be seeing all kinds of errors. For starters typically your load balancer only balances port 80 or 443, but WMI uses other ports. So these connections will fail. As far as I learned from my AX colleague, the AOS instance can use the load balancer configuration entry, and you can use the node configuration for your report deployments. In that way, the server name probably doesn’t matter that much on the load balancer configuration item.
I hope I don’t sound to cryptically, if you like any further explanation, feel free to comment.
0 comments