Celtic Coding Solutions Blog

Celtic Coding Solutions Blog - for everything computer related

SSRS 2005 Asp.Net Microsoft.ReportViewer.WebForms unable to load client print control

Using Visual Studio and Asp.Net 3.5 created an Asp.Net application using the SSRS 2005 Microsoft.ReportViewer.WebForms version 8.0.0.0 control.

Trying to print a report directly from http://ServerName/Reports using the little printer button worked fine, the cab was downloaded correctly and installed.  However using the printer button on the custom Asp.Net application resulted in the error "Unable to load client print control.":-


Strange, I checked the Asp.Net web.config and the correct assembly declarations where made:-

<add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

Saw lots of posts about installing the following on the server:-

Microsoft Report Viewer Redistributable 2005 

Microsoft Report Viewer Redistributable 2005 Service Pack 1 

Report Viewer Redistributable 2005 Service Pack 1 GDIPLUS.DLL Security Update 

So did this but still the error persisted.

Fix:-

On the server, open "Internet Information Services (IIS) Manager

Open up "Sites" and where you website is located on this I am just using "Default Web Site":-


Then click "Handler Mappings":-


Then click "Add Managed Handler...":-


Under Request Path add:-

Reserved.ReportViewerWebControl.axd

Under Type add:-

Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Under Name Add:-

Reserved.ReportViewerWebControl.axd

So should look like:-


Click OK and restart IIS.

Now you Asp.Net application print button from the Report Viewer control should work.

SSRS Error System.InvalidOperationException: Operation is not valid due to the current state of the object.

SSRS 2005 running on Windows Server 2008 R2 had the following errors as reported on SSRS Logs:-

System.InvalidOperationException: Operation is not valid due to the current state of the object.

Seems to possible causes:-

Installation of Security Update for Microsoft .Net Framework 4 on Servers (KB2656351) and also having large number of parameters or form fields in a SSRS report.

Fix

Open Web.Config for ReportManager usual at:-

C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportManager 

Find <appsettings> in the file and add 2 new keys:-

<add key="aspnet:MaxHttpCollectionKeys" value="10000" />

<add key="aspnet:MaxJsonDeserializerMembers" value="10000" />

So you should see something like:-

<appSettings>

    <add key="ReportViewerServerConnection" value="Microsoft.ReportingServices.UI.WebControlConnection, ReportingServicesWebUserInterface, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

    <add key="ReportViewerTemporaryStorage" value="Microsoft.ReportingServices.UI.ReportViewerTemporaryStorage, ReportingServicesWebUserInterface, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

    <add key="aspnet:MaxHttpCollectionKeys" value="10000" />

    <add key="aspnet:MaxJsonDeserializerMembers" value="10000" />

</appSettings>

Also I recommend changing the Web.Config for ReportServer usual at:-

C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

In this file there is usual no <appsetting> already added so just pop one under the </ConfigSections> part:-

</configSections>

<appSettings>

<add key="aspnet:MaxHttpCollectionKeys" value="10000" />

<add key="aspnet:MaxJsonDeserializerMembers" value="10000" />

</appSettings>

No need to re-start SSRS or IIS, it should just now be fixed.

SSRS Failure Sending Mail - Subscription Error From/Sender missing

Trying to create a new SQL Server 2005 Reporting Services subscription and keep getting the following error:-

Failure sending mail: At least one of the From or Sender fields is required, and neither was found.

I've checked and the To and Reply-To fields have a full email extension e.g. MyName@Company.com

The fix is quite an easy one:-

Look in the RSReportServer.config file usual located in:-

C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer

Search under the <RSEmailDPConfiguration> for <From></From> here I noticed it had the server name so <From>ReportServer1</From>. 

I changed this to be <From>Support@Company.com</From> and now the subscription works fine.

Microsoft Dynamics AX Reporting Project Deployment 2009 - errors

Using Windows Server 2008 R2 and SQL Server 2005 SSRS, trying to install Dynamics AX 2009 reports.

Installed the client and reporting extensions fine and connected to the AOS server.  Running the Microsoft Dynamics AX Reporting Project Deployment setup and it was failing with:-

The following components have not been installed or are not configured correctly:

AL.exe

Microsoft Domain-Specific Language Tools


Fix:-

Looks like you need to download and install 2 files:-

Windows SDK for Windows Server 2008 and .NET Framework 3.5

&

Microsoft Visual Studio 2008 Shell (isolated mode) Redistributable Package

Run both these setups and run the Microsoft Dynamics AX Reporting Project Deployment again and you now might get the following error:-

The following components have not been installed or are not configured correctly:

Microsoft Domain-Specific Language Tools


Seems like when you run the Microsoft Visual Studio 2008 Shell (isolated mode) Redistributable Package it just un-compresses the actual setup file on the Hard Drive in my case under:-

C:\VS 2008 Shell Redist\Isolated Mode

Run the following file found in the directory:-

vs_shell_isolated.enu.exe

And then re-try the Microsoft Dynamics AX Reporting Project Deployment again and all should be well - phew!

SSRS 2005 Web Page Resource cannot be found

Had a strange error with SSRS 2005 on Windows 2003 Server running IIS6.  Trying to load the Web Reports Manager for SSRS 2005 at http://localhost/reports and I would get the following error:-

Server Error in '/Reports' Application

The resource cannot be found

Description: HTTP 404.

Ok but I can load up:-

Http://localhost/reports/home.aspx

So I thought the Default content page wasn't set - nope it was?

OK so what is going on, only different is Asp.net 4.0 was installed.  Saw some articles saying maybe the Asp.net version wasn't set correctly for that Web Applications, but again checked and it was still set to buy abortion pills Asp.Net 2.0. 

Fix:-

Seemed like the root web ru 486 pill properties (Default Web Site Properties in this instance) was set to Asp.Net 4.0.

OK so changed this back to Asp.Net 2.0 and restarted IIS.  Bingo no SSRS 2005 http://localhost/reports works again.

Permission error with Dynamics AX 2012 and SSRS 2008 r2 report

When trying to run FreeTextInvoice.Report from Dynamics AX 2012 using SSRS 2008 r2 keep getting the following error whilst trying to print:-

Error while setting server report parameters. Error message: The permissions granted to user 'TestUser' are insufficient for performing this operation. (rsAccessDenied)

Stack trace: Call to TTSCOMMIT without first calling TTSBEGIN.

Stack trace

(S)\Classes\CustPrintOutInvoice\printOut - line 123
(C)\Forms\CustFreeInvoiceListPage\Methods\printInvoice
(C)\Forms\CustFreeInvoiceListPage\Designs\DesignList\PrintSelected\Methods\Clicked

Also looking at SQL Server 2008 how to get a abortion abortion pill online r2 SSRS Log files at:-
C:\Program Files\Microsoft SQL Server\ServerName\Reporting Services\LogFiles

ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: , Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'TestUser' are insufficient for performing this operation.;

Fix was quite easy but not obvious to find:-

Bascially check all folder permissions and that they are inheriting from the root.

e.g. this particular report FreeTextInvoice.Report is contained within the DynamicsAX/StaticReports/en-GB (and other languages).  But for some reason this folder didn't inherit the permissions from the root (DynamicsAX).

So all I do is navigate to the folder and then click the "Revert to Parent Security".

Installation guide for Dynamics AX 2009 and SQL Reporting Services 2005

This guide is intended to outline the software installation and configuration to start building custom SSRS 2005 for use within Dynamics AX.

 

1.0) Install SQL Server 2005 Developer edition

Select the following (at minimum):-

Make sure the following are to be installed:-
•    Reporting Services/Shared Tools
•    Client Components/Business Intelligence Development Studio (cut down version of Visual Studio 2005)

 

2.0) Install Dynamics AX 2009 Client Tools

The following will need to be installed:-
•    Client
•    Reporting Extensions
•    Reporting Tools
•    .Net Business Connector

2.1) Instance Type

2.2) Components

2.21) Components - Possible Issues

While trying to install Dynamics AX 2009 Client Component, you may get the following error:-

Setup has detected that you are installing Reporting extensions on an operating system that is not supported for Microsoft Dynamics AX. The minimum supported server operating system is Microsoft Windows 2003 with Server Pack 2

Click Yes and you will then see the following error:-

You must install SQL Server 2005 Reporting Services Service Pack 2 before installing the reporting extensions.

After trying to install SQL Services Packs, uninstalling SQL Server etc the only option that seem to work was early option pill from the following website:-

http://community.dynamics.com/product/ax/f/33/p/12322/31719.aspx

The instructions followed are:-
The same problem with SQL Server 2005 SP3, this fix our problem:
1. Open the registry and find the HKLM\SOFTWARE\Microsoft\Microsoft SQL Server key.
2. Right-click the HKLM\SOFTWARE\Microsoft\Microsoft SQL Server key and choose New > Key.
3. Name the key Reporting Services.
4. Right-click the Reporting Services key and choose New > String Value.
5. Name the string value Version. The Version string value will have a type of REG_SZ.
6. Double-click the Version string value and enter 9.00.3042.00 as the value data. Click OK.

3.0) Install Dynamics AX Report Dlls

There are some Dynamics AX Dlls that are used in the SQL Server Reporting Services Reports:-
•    Microsoft.Dynamics.Framework.Design.Reports.dll
•    Microsoft.Dynamics.Framework.Reports.dll
•    Microsoft.Dynamics.Framework.ReportsDeployment.dll
•    Microsoft.Dynamics.Framework.ReportsExtensions.dll
•    SysSecurity.BusinessLogic.dll

They all need to be placed in the Reporting Services bin folder e.g.:-
C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin

I also install them in medicine abortion the GAC (C:\Windows\Assembly folder) apart from SysSecurity.BusinessLogic.dll which is not strongly named assembly.

SQL Server Reporting Services Subscription Error

After creating a Subscription for a report I noticed it was not actually sending the email error reported was:-
Failure sending mail: An error has occurred during report processing.

To Find out what is the actual error take a look at why abortion the SSRS Logs (usually located at):-
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\LogFiles

The Error we are looking for is something along the lines of:-
Error will appear in the latest log as:-
ReportingServicesService!processing!e!DD/MM/YYYY-HH:MM:DD:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
 Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'DataSetName'. ---> System.Data.SqlClient.SqlException: A severe error occurred on the current command.  The results, if any, should be discarded.
Operation cancelled by user.

The cause is abortion options most likely due to the report taking too long to be created.  Therefore check your timeout seconds in the Report Manager:-
Http://YourReportServer/Reports
Click Site Settings (Top Left Corner)
Under "Report Execution Timeout" change to the following:-
"Limit report execution to the following number of seconds: 3600" e.g. 1hr