Showing posts with label ssrs. Show all posts
Showing posts with label ssrs. Show all posts

Monday, June 13, 2016

Could not load file or assembly 'Microsoft.ReportingServices.RdlObjectModel, Culture=neutral, PublicKeyToken=' or one of its dependencies. Access is denied. ax2012

Today I faced a new error while running reports in AX. "Could not load file or assembly 'Microsoft.ReportingServices.RdlObjectModel, Culture=neutral, PublicKeyToken=' or one of its dependencies. Access is denied. ax2012"

The solution to this is to give permission to all the users on the .NET folder:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files” ( Modify the framework version, root directory etc according to your environment. )

Goto folder properties, select security, select "USERS" and grant full control. Press Apply and OK.


Credit: https://blogs.msdn.microsoft.com/sayanghosh/2007/04/21/solution-to-could-not-load-file-or-assembly-or-one-of-its-dependencies-access-is-denied/

Tuesday, March 22, 2016

Repeat table header SSRS

Sounds easy going by the usual way of Tablix properties and check the "Repeat header rows on each page". Strangely this didn't work for me today so I found out a new way for same.

Under Design Pane - > at the bottom Column Groups - > click on drop down (down arrow) - > Advanced Mode.



Once we selected Advanced Mode, we will be able to notice (static) in Row Groups and Column Groups at the bottom of Design pane .



Under Design Pane - > Row Groups - > click on (static) - > Press F4 - > Properties window will pop-up.

In the Properties window - >Set KeepWithGroup = After and RepeatOnNewPage = True.

If you want the header to be frozen while scrolling down the report, set FixedData = True.




Credit: http://social.technet.microsoft.com/wiki/contents/articles/19398.ssrs-how-to-repeat-headers-on-each-page.aspx

Tuesday, February 16, 2016

The "deploytoreportsservertask" failed unexpectedly. SSRS deployment fails.

Please GOTO Computer properties and follow the below steps:


Credits: http://axwiki.blogspot.com/2015/04/deploying-ssrs-from-vs-2010-solved.html#comment-form

Saturday, February 6, 2016

Hide parameters in Report dialog Ax2012

There are different ways to do it. Some of them are:



Method 1:

Why the default ranges will come in Dialog?:

Because in the Query used it will show the index fields of the Table, so to hide the Default ranges you have to overload the showQueryValues() in the Controller class: return FALSE.

Credit: http://axdevhelper.blogspot.com/2012/09/how-to-hide-default-query-parameters-in.html


Method 2:

The View group fields comes from InventDimViewContract class which is added as a parm method in ProdPickListContract class to show the options for all inventory dimensions.

Suppose, we want to hide all the parameter groups from report dialog and just want to display the dynamics filters on the report. You need to modify the UIBuilder class of your report. For production picking list report, the UI Builder class is ProdPickListUIBuilder. The build method needs to be modified and the code in Bold below can be used to hide the whole parameter group from SSRS report dialog:

public void build()
{
FormBuildGroupControl grp;
grp = this.dialog().curFormGroup();
grp.frameType();
grp.columns(2);

if (this.controller().parmArgs().menuitemName() == #yourMenuItemName)
{
grp.visible(false);
}
super ();
}

To hide the dynamic filters from SSRS report dialog based on caller menu item, you need to override the following method in your controller class and return false from this method based on your condition:

showQueryValues

Override this method in your controller class and write the following code:

public boolean showQueryValues(str parameterName)
{
If (this.parmArgs().menuItemName() == menuItemOutputStr(#YourMenuItemName)
{
return false;
}
else
{
return true;
}
}

Credits: https://syedbaber.wordpress.com/2015/07/23/hiding-parameter-groups-or-dynamics-filters-on-ssrs-report-dialog-at-runtime/

Method 3:
If you use a report controler class, you can overwrite the showQuerySelectButton method and return false.


Method 4 :
If you remove the ranges from the modeled query, and add them back programmatically in the methods of the query, they also will not show up as parameters for the report.


Method 5:

contract parameters are can definately be hidden . Look at any report that uses srstmpTableMarshaller class (Pseudo tmp table report's ). or any document reports . Journal record id is generally passed from controller --> Design (via parameter value in contract class) -- >DP class.


But still it's not visible on the report. All you need to is set its property to hidden in VS.
I feel its more like issue with the usage data.
Once you set the property to hidden you need delete the report from report manager and then redeploy, remove usage data, delete records in SYSLastValue, SRSReportQuery restart Reporting services.

Method 6:

Allow dynamic filtering false and remove the dynamic parameter. redeploy the report and refresh the user cache.


Method 7:

You can also use a not defined group.
SysOperationGroupMemberAttribute(‘group_notdefined_at_classdeclaration’)

The group ‘group_notdefined….’ will not be shown on the dialog, so all its members are
invisible.

Credits: https://community.dynamics.com/ax/f/33/t/83017

https://community.dynamics.com/ax/f/33/p/155614/364546#364546


Now one of them would surely help :)

Sunday, January 24, 2016

Unable to connect to the AOS specified in the AX Client Configuration in SSRS

Today, I faced a really weird issue while designing a report in VS2012. After designing the report I tried building the solution and got the below error:

Error 1 Unable to connect to the AOS specified in the AX Client Configuration. The configuration could be missing, invalid, or the AOS is not running. To connect to the AOS, check the network connection between the client and the AOS, verify that a valid configuration exists and that the AOS service is running on the server. C:\Program Files (x86)\MSBuild\Microsoft\DynamicsTools\Microsoft.Dynamics.Framework.Design.Reporting.Modeling.targets 103 6 ReportModel2



Error 2 The "GenerateRdlTask" task failed unexpectedly.

Microsoft.Dynamics.Framework.BusinessConnector.Session.Exceptions.NoKernelSessionException: Unable to connect to the AOS specified in the AX Client Configuration. The configuration could be missing, invalid, or the AOS is not running. To connect to the AOS, check the network connection between the client and the AOS, verify that a valid configuration exists and that the AOS service is running on the server. --->


After trying the obvious things like verifying the SSRS & BC configurations and connectivity, I had to move to the boss "Google" and got out a really interesting thing about how Business Connector works:


"The root cause is the SSRS report file size is exceeding the limit, as there are multiple layouts for the report file, and each layout has several pictures embedded. So, the size was over 10M, we tried multiple times, the report can work correctly when the size is relatively small, but once over about 10M, the business connector cannot hold the report effectively and the connect is lost.


The solution is to create another SSRS file to have other layouts."


I had created a copy of the existing design which was exceeding the size so I deleted it and all worked fine.




Source: http://dynamicsuser.net/forums/t/84427.aspx

Friday, January 22, 2016

SSRS performance improvement

With one of our clients, we were facing this issue of reports loading really slow. Even the simple document reports were taking 2-3minutes to display data. So finally the solution came out that we need to increase the recycle time of the SSRS.

That's how to do this:
Navigate to "C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer" (depending on the SSRS version).

Look for file RSReportServer.config and open it.

Now find the tag "RecycleTime" from the default "720" to "1440". You can try increasing the value further depending on the performance.


Hope this helps. :)

Monday, November 23, 2015

The formatter threw an exception while trying to deserialize the message Ax2012

Today I received below error first while deploying report then while viewing it:
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:queryBuilderArgs. The InnerException message was 'Element 'http://tempuri.org/:queryBuilderArgs' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/XppClasses:SrsReportProviderQueryBuilderArgs'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver or add the type corresponding to 'SrsReportProviderQueryBuilderArgs' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details.

The solution to this was:
1. Delete all records from SysClientSessions.
2. Restart AOS.
3. Restart SSRS.
4. If above steps don't work then you can also try deleting the existing report and redeploying. Or deleting AUC files. And also deleting the XPPIL folder and performing full CIL.

Or the best way when you face this error in production environment and cannot take a downtime:
Just deactivate and re-activate the BIServices Inbound Port and the magic is done.

Source:
https://community.dynamics.com/ax/f/33/t/112982

Monday, September 21, 2015

Publish-AxReport parameters

Publish-AXReport

Deploys reports from Microsoft Dynamics AX to a Microsoft SQL Server Reporting Services instance.

Syntax

Parameter Set: Default
Publish-AXReport -Id <String> [-ModifiedAfter <DateTime> ] [-ReportName <String> ] [-RestartReportServer] [-ServicesAOSName <String> ] [-ServicesAOSWSDLPort <Int32> ] [-ServicesFilePath <String> ] [-SkipDeletingExistingReport] [-SkipReportServerAdminCheck] [ <CommonParameters>]

Detailed description

The Publish-AXReport cmdlet deploys reports from Microsoft Dynamics AX to a Reporting Services instance. By default, previously deployed report metadata is deleted and replaced when reports are deployed.

Parameters

-Id<String>

Specifies the identifier of the configuration to use to connect Microsoft Dynamics AX and Reporting Services.

Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ModifiedAfter<DateTime>

Limits the reports to be deployed to those modified after a specified date. Use the date format specified by your operating system. If you do not know the format, you can run the Get-AXReport cmdlet to see the format of ChangedDate.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ReportName<String>

Specifies the names of the reports to be deployed.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-RestartReportServer

Forces the Reporting Services service to restart after a report is deployed.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ServicesAOSName<String>

Specifies the name of a Microsoft Dynamics AX Application Object Server (AOS) instance to connect to instead of the default value.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ServicesAOSWSDLPort<Int32>

Specifies the web service (WSDL) port of an AOS instance to connect to instead of the default value.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ServicesFilePath<String>

Specifies a client configuration parameter file (.axc) to use instead of the configuration that is stored in the registry.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-SkipDeletingExistingReport

Specifies that the cmdlet should not delete existing report design metadata when executed.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-SkipReportServerAdminCheck

Specifies that the cmdlet should be executed without checking whether the user has administrator rights on Reporting Services.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see about_CommonParameters http://go.microsoft.com/fwlink/?LinkID=113216

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.
  • None

    You cannot pipe input to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.
  • None

    The cmdlet does not generate any output.

Examples

This example publishes reports whose names start with CustomReports and that were modified after October 10, 2011 to the report server configuration ReportServer01, and then forces the server to restart.

C:\PS>Publish-AXReport -Id ReportServer01 -ModifiedAfter 2011-10-10 -ReportName CustomReports* -RestartReportServer

Source: https://msdn.microsoft.com/en-us/library/jj720262.aspx



Deploy report to a specific AOS instance

Publish-AXReport –ReportName * -id AXSSRS –servicesAOSname AXServer –servicesAOSWSDLPort 8101

Here AXSSRS is the SSRS configurationID name and AXServer is the system name not AOS name.