AX 2012 SSRS Troubleshooting

Today I got the following message… “Could you just fix the reports on this AX 2012 environment… It is broken”

Then I tried to validate the report configuration I got the following error:

The SQL Server Reporting Services server name [servername] does not exist or the Web service URL is not valid.

OK… First test:

Can I browse to the report URLs in System Administration – Business Intelligence – Reporting Services – Report Servers.

No I could not, from the AX Server. it worked from the SQL Server so I checked the firewall on the SSRS Server and added port 80.

I still get the same issue when validating. So I opened the Microsoft Dynamics AX 2012 Management Shell as an administrator and ran Test-AXReportServerConfiguration

What… I opened the port and I can browse to the URLs. Apparently the as scripts tests for Remote Admin Ports so when I open those ports using this netsh command

netsh.exe firewall set service type=REMOTEADMIN mode=ENABLE scope=ALL

Presto!! The validation was successful!!


Links
Configure a Report Server for Remote Administration

Validating SSRS settings in AX 2012 fails

Tonight one of my colleagues called me having issues with validating the SSRS setup for an old AX 2012 R3 environment. Unfortunately it had been many years since I even touched a 2012 server which meant I had to turn to my trusted advisor… Google 🙂

The error he got was this:
“Make sure that SQL Server Reporting Services is configured correctly. Verify the Web Service URL and Report Manager URL configuration in the SQL Reporting Services Configuration Manager.”

Image

The problem is caused by UAC end there are 2 “solutons”

  1. Turning off UAT (which is absolutely NOT recommended).
    Error when validate settings in Report servers by any admin account which is not account used to install the AX reporting services extensions. – Microsoft Dynamics AX Forum Community Forum
  2. Running the AX client as Administrator. To do this right-click the AX 2012 Client (it has to be the client and not the .axc file) and slect “Run as Administrator”
    AX2012R2 SSRS Validation error as make sure the SQL Server Reporting Services is configured correctly – Microsoft Dynamics AX Community

That is it for today

Troubleshooting Reporting Services in Dynamics 365 for Finance and Operation

Today one of my colleagues contacted me and had problems with the “Report sales tax for settlement period” report in one of our environments. It worked last friday bur not today. The error message was this:

When I looked for the Session ID in the Environment monitoring in LCS, one of the errors I got was this one:

Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection+MissingEndpointException: The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version

and another one was:

TmpTaxReportById_TaxReportField on table TaxReportTmp_SE.

I already knew this was related to SSRS (Reporting Service) so obvoiously I began with restarting the Report Server, it did not help.

Since the environment is a Microsoft Hosted Tier-2 environment the first error was really strange… why should Microsoft supply an incompatible SSRS server… Not likely…

Another error I got was an authentication error… this made me think that there was something wrong with the AOS. I tried restarting the IIS Server… It helped !!!!!

Redeploying SSRS reports in D365FO without using Visual Studio

Since I am not a developer… especially not an X++ developer I am ususlly not entrusted with access to Visual Studio (this statement was more for dramatic effect but the truth is that I am trying to avoid it to not mess things up).

The main reason for this work around is that in some environments Visual Studio is not set up and to do that would require setting up the correct account, mapping workspaces and a whole lot more. This way is simpler:

  1. Log into the Dynamics Server
  2. Start PowerShell Elevated as Administrator
  3. Run the following command:

    K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation “K:\AosService\PackagesLocalDirectory”

That will redeploy all of the for Dynamics 365 for Operations

Links:
https://msdax.wordpress.com/2018/04/08/deploying-ssrs-reports-to-dynamics-ax-365/

Renaming a OneBox Dev environment

Hi

Tonight I helped one of my developer colleagues who had issues with one of his DEV environments. The issue was that he had renamed the VM (you cannot have multiple machines in Azure DevOps with the same name). The problem was that he had not completed all the steps that is required to rename so it was behaving a bit weird.

First of all we were not able to connect to Reporting Services Configuration Manager. The solution was unfortunately not very logical… In the onebox environment there is a couple of SQL components installed from different SQL Server Versions:

If you use the wrong SSRS Configuration Manager it is not able to connect to the SSRS Server and get the error message: No report servers were found

The correct version is 2016! Completely logical… NOT!

When this was done we just followed this guide to complete the rename and all is well 🙂

/Johan

Links:
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/migration-upgrade/vso-machine-renaming
http://www.alexondax.com/2017/05/what-i-do-to-rename-d365-virtual.html
https://community.dynamics.com/365/financeandoperations/f/765/t/269137

SSRS using wrong configuration

Everything that is printed in AX 2012 is using SQL Server Reporting Services (SSRS). It does this by connecting to AX when it is told to and gets the data. To find the settings for the AX Server it normally uses the default client configuration. In some cases (especially when you have multiple instances) this fails or SSRS is using the wrong configuration.

You can help SSRS by saving the correct configuration in  C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin with the name Microsoft.Dynamics.AX.ReportConfiguration.axc

Have a nice day

/Johan

Problems accessing the /reports website in Dynamics 365 VMs

Hi

Today I had an issue trying to access the classic reports folder for SSRS in a Dynamics 365 for Finance and Operations VM hosted in Azure. When connecting to the site we used http://[VMname]/reports and all we get is a login prompt.

This one was quite easy… Just fire up the Reporting Services Configuration Manager, goto Web Portal URL and click Apply to configure it

And that is it!

Happy weekend

/Johan

Issues after Database copy

Yesterday we did a database refresh between two of our Non-Production OneBox environments an this morning I got an email. The users where having problem viewing invoices in All Sales Orders. The error they got looked like this:

“Something went wrong while generating the report. Please try again”

That was not extremely helpful so I started looking around and found information on how to get a detailed log:

1. Click on Environment monitoring.
2. Click on Raw logs
3. In the query name field, select “All events for activity”
4. Copy 78ca1c74-3c56-4f6b-8c18-a4034876780d in the activity ID
5. Click on shows options and set Row limit to 5000.
6. Click on search.
7. Scroll down towards the end to see exception message.

And that got me (not very useful):

at [aoskernel.dll]Microsoft.Dynamics.Ax.MSIL.Interop.GetManagedCallStack(basic_string<wchar_t\,std::char_traits\,std::allocator >* ) at [aoskernel.dll]Microsoft.Dynamics.Ax.Services.AOSAppDomainHelper.callGetManagedCallStack(basic_string<wchar_t\,std::char_traits\,std::allocator >* ) at callGetManagedCallStack(basic_string<wchar_t\,std::char_traits\,std::allocator >* ) at cqlClass.callEx(cqlClass* , Char* , interpret* ) at cqlClass.callEx(cqlClass* , Char* , interpret* ) at [aoskernel.dll]Microsoft.Dynamics.Ax.MSIL.cqlClassIL.Call(IntPtr c, String methodName, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes) at [Microsoft.Dynamics.AX.Server.Core.dll]Microsoft.Dynamics.Ax.Xpp.XppObjectBase.Call(String methodName, Object[] parameters, Type[] types, Object[] varargs) at [Microsoft.Dynamics.AX.Xpp.Support.dll]Dynamics.AX.Application.xInfo.add(Exception exception1, String text1, String text2) at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.`add(Exception _exception, String _txt, String _helpUrl, XppObjectBase _sysInfoAction, Boolean buildprefix, String _label, Boolean @_helpUrl_IsDefaultSet, Boolean @_sysInfoAction_IsDefaultSet, Boolean @buildprefix_IsDefaultSet, Boolean @_label_IsDefaultSet) in xppSource://Source/ApplicationPlatform\AxClass_Info.xpp:line 335 at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.InfoCoCHelper.`add(Info instance, Exception arg0, String arg1, String arg2, XppObjectBase arg3, Boolean arg4, String arg5, Boolean , Boolean , Boolean , Boolean ) at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.add(Exception _exception, String _txt, String _helpUrl, XppObjectBase _sysInfoAction, Boolean buildprefix, String _label, Boolean @_helpUrl_IsDefaultSet, Boolean @_sysInfoAction_IsDefaultSet, Boolean @buildprefix_IsDefaultSet, Boolean @_label_IsDefaultSet) at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.add(Exception _exception, String _txt) at [Dynamics.AX.ApplicationFoundation.dll]Dynamics.AX.Application.SrsReportViewerControl.`displayErrorMessage(String message) in xppSource://Source/ApplicationFoundation\AxClass_SrsReportViewerControl.xpp:line 870 at [Dynamics.AX.ApplicationFoundation.dll]Dynamics.AX.Application.SrsReportViewerControl.SrsReportViewerControlCoCHelper.`displayErrorMessage(SrsReportViewerControl instance, String arg0) at [Dynamics.AX.ApplicationFoundation.dll]Dynamics.AX.Application.SrsReportViewerControl.displayErrorMessage(String message) at SrsReportViewerControl::displayErrorMessage(Object , Object[] , Boolean& ) at [Microsoft.Dynamics.AX.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters) at callILClassMethod(interpret* ip, Char* method, UInt32 chdl, cqlClass* c) at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.InvokeCommand(CommandInteraction interaction, CommandCallbackInteraction& result) at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.HandleCommandInteraction(CommandInteraction interaction, List`1 outboundInteractions) at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.HandleInteractions(IInteractionChannel interactionChannel) at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionManager.ProcessMessages(Object stateinfo) at [mscorlib.dll]System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at [mscorlib.dll]System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at [mscorlib.dll]System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at [mscorlib.dll]System.Threading.ThreadPoolWorkQueue.Dispatch()</wchar_t\,std::char_traits</wchar_t\,std::char_traits</wchar_t\,std::char_traits

So I started to look around a little and found the System administration – Setup – Server Configuration and noticed that there were 2 servers… in a OneBox Environment…

                     SNAGHTMLa4c1c3d

The migration server was still there and it seemed that it was trying to have that one generate the report. When I removed the extra server it started working

/Johan

The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type ‘System.Security.Permissions.EnvironmentPermission

This is a follow up to the last post regarding Reports in AX.

When I tried the report I published I got an other error:  The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type ‘System.Security.Permissions.EnvironmentPermission

image

When I tried the report again it worked… Weird!

Apparently it has to do with the configuration of SSRS. If you open the SSRS configuration file called rssrvpolicy.config in

C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer

Find the line PermissionSetName=’Execution’ and change it to PermissionSetName=”FullTrust” (remember to make a backup of the file before you change it)

/Johan

Links
https://community.dynamics.com/ax/b/axsupport/archive/2012/02/02/microsoft-dynamics-ax-2012-reporting-extensions-error-system-security-permissions-environmentpermission-while-running-report

rsItemNotFount in AX 2012

So this one involves Reporting Services and AX. One of my customers had an issue printing a report today and the error he got was that the report did not exist.

image

I checked the SSRS web UI and sure enough I could see it… The problem was that it was not correctly published from AX. To fix this I went into the UAT (Ctrl?D), found the report, right-clicked it and clicked Deploy Element.

image

I tried it and everything looked fine and dandy… or so I thought Sad smile

When I went into the SSRS Web I found that the reports I just published ended up in a new subfolder and not in the standard DynamicsAX folder

image

Turned out there was an error in the AX Reporting Server Setup
image should be image

So I changed it and everything worked fine. Remember to delete the extra folder that was created by mistake in SSRS Web.

So the problem was actually in my case not an issue with a published report… it was an error with the path containing reports…

That’s all for today

/Johan

Links:
http://axbloggerblog.blogspot.se/2012/01/deploy-dynamics-ax-2012-default-ssrs.html