Saturday, August 20, 2016

Report Issues in Ax 2012

1 . Problem :
Error while setting server report parameters. Error message: The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (rsRuntimeErrorInExpression) in ax 2012

Solution:

http://rahulmsdax.blogspot.in/2015/02/error-while-setting-server-report.html

2 . Problem: 

Publish-AXReport -ReportName *
i got an error:
...
Publish-AXReport : A call to the Microsoft Dynamics AX SRSFrameworkService
service failed. An existing connection was forcibly closed by the remote host.
At line:1 char:1
+ Publish-AXReport -ReportName *
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (Microsoft.Dynam...shReportCommand:Pu
blishReportCommand) [Publish-AXReport], ReportException
+ FullyQualifiedErrorId : A call to the Microsoft Dynamics AX SRSFramework
Service service failed. An existing connection was forcibly closed by the
remote host.,Microsoft.Dynamics.AX.Framework.Management.Reports.PublishRep
ortCommand
....
but i can deploy a single report by its name only, not all at the same command!!

Solution:

Start > Administrative Tools > Microsoft Dynamics AX 2012 Management Shell

run the below script:

foreach ($letter in 97..122) 
{
Publish-AXReport -ReportName "$([char]$letter)*"
}


3.Problem:

Publish-AXReport : Client found response content type of '', but expected
'text/xml'.The request failed with an empty response.
At line:1 char:1
+ Publish-AXReport -ReportName *
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (Microsoft.Dynam...shReportCommand:Pu
   blishReportCommand) [Publish-AXReport], InvalidOperationException
    + FullyQualifiedErrorId : Client found response content type of '', but ex
   pected 'text/xml'.
    The request failed with an empty response.,Microsoft.Dynamics.AX.Framework

   .Management.Reports.PublishReportCommand

Solution: Restart the Sql Server Reporting Service and try to deploy

Enable/Disable form control based on multiple rows select

 class PurchTableFormEventHandler {      [FormDataSourceEventHandler(formDataSourceStr(PurchTable, PurchTable), FormDataSourceEventType::Act...