Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server Reporting Services - error running a report (Azure web site deployment issue?)

I have a ASP.NET MVC front-end which lists reports held on SQL Azure Reporting Services. The user chooses a report to run and that report is loaded in another browser window. The problem is that when the report runs on some browsers (IE10 on Win7, for instance) all that is displayed is the following message:

Method not found: 'Boolean Microsoft.ReportingServices.Common.DateTimeUtil.TryParseDateTime(System.String, System.IFormatProvider, System.DateTimeOffset ByRef, Boolean ByRef)'.

Using Chrome on Win7 the report 'half-works' - I get the top bar with a datetime box and another drop-down, and when I click the Run button I get the report nav bar but not the body of the report. I don't get the message above.

The web site is published to an Azure web site. I've referenced the following DLLs and set CopyLocal to true:

Microsoft.ReportViewer.Common
Microsoft.ReportViewer.WebForms
Microsoft.ReportViewer.DataVisualization
Microsoft.ReportViewer.ProcessingObjectModel

The published report works fine on my dev machine where I have the ReportViewer 2012 redistributable installed (version 11 of the control).

So, questions:

What other redistributable dlls am I missing from my published site? What is Microsoft.ReportingServices.Common? The 'ByRef' seems to imply this is VB - is this a client script component? Is there something I need to have installed on client machines to view reports?

like image 385
kenxl Avatar asked Oct 22 '13 16:10

kenxl


People also ask

What is wrong with the report server?

The report server has detected a possible denial of service attack. For more information, see Reporting Services Security and Protection. The report server cannot create a performance counter. The web portal cannot connect to the Report Server service. A scheduled task in the SQL Server Agent queue has been modified or deleted.

How do I run SSRs on Azure SQL managed instance?

After you have Azure SQL Managed Instance and the Azure Storage Account ready, connect to the machine running your SSRS instance. This could be an On-Premise server or an Azure VM. Via SQL Server Management Studio (SSMS), you need to connect to the SQL Server instance currently hosting your report server databases.

How to configure the connection to the Report Server database?

The connection to the report server database is managed through the Reporting Services Configuration tool. You can run the tool, go to the Database Setup page, and correct the connection information.

Where can I find the cause and resolution of reporting services errors?

Cause and resolution information is available for the errors most frequently searched for on the Microsoft web sites. For more information, see Cause and Resolution of Reporting Services Errors. The following report server events are recorded in the Microsoft Windows application log.


2 Answers

The same issue happened where a method not found error on IE and Firefox after deployment occured, while running locally everything worked fine.

 Method not found: 'Boolean Microsoft.ReportingServices.Common.DateTimeUtil.TryParseDateTime(System.String, System.IFormatProvider, System.DateTimeOffset ByRef, Boolean ByRef)'.

what was happening is that in our local bin file there's a newer version of the Microsoft.ReportViewer dlls than the deployment server. When the deployment server added the dll's it selected a different version from the GAC than being used locally. Version 11.0.2 instead of 11.0.33 causing the miss match. After updating the dll's to the same version on the local machine it fixed the issue. there is a chance that after you re-deployed the correct dll was used, fixing your problem.

To verify the version of the dlls in your bin folder and deployment folder you can just use a simple power shell script after navigating to the folder holding the dlls.

dir *.dll | %{ $_.VersionInfo }
like image 200
crackhaus Avatar answered Nov 15 '22 21:11

crackhaus


crackhaus's answer pointed me in the right direction.

Here is the full sequence of steps I followed:

  1. Used the following PowerShell command to check the version numbers of the assemblies in the bin folder:

    dir *.dll | %{ $_.VersionInfo }
    
  2. Discovered that one of the ReportViewer assemblies had a different version number from the other two.

  3. I checked the version number for that DLL in my local GAC, and found that the GAC DLL matched versions with the other two DLLs in my bin folder.

    I used Option 2 described here to access the GAC (basically: PowerShell to c:\WINDOWS\assembly\GAC_MSIL\<Assembly Name>\<Assembly Major Version>), and the command above to check version numbers.

  4. Using PowerShell (copy-item command), I extracted the DLL, and placed it into the site's BIN folder.

like image 26
AaronSieb Avatar answered Nov 15 '22 22:11

AaronSieb