First off, the error doesn't occur when running locally, only when I have it published to the web server (Server 2008 R2). The error message (first portion) that gets returned is:
MICROSOFT.REPORTING.WEBFORMS.LOCALPROCESSINGEXCEPTION: AN ERROR OCCURRED DURING LOCAL REPORT PROCESSING. ---> SYSTEM.NULLREFERENCEEXCEPTION: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT.
A
MICROSOFT.REPORTINGSERVICES.RENDERING.HPBPROCESSING.TABLIX.UPDATETOPITEMKT(PAGEITEM TOPITEM, ROWINFO ROWINFO, PAGEDETAILCELL CURRCELL)
The code snippet that is rendering the report is in VB.Net...
Dim report As LocalReport = New LocalReport()
report.DataSources.Clear()
report.ReportPath = "App_GlobalResources\MyReport.rdlc"
report.DataSources.Add(New ReportDataSource("MyDataSource", MyDataTable))
report.Refresh()
Dim byteReport As Byte() = New Byte() {}
'The next line is where it fails with the exception above.
byteReport = report.Render("pdf") 'Get bytes to use with memory stream
We do have other reports that work fine using the same code, but this report uses the Row Groups in the table to group data together with a heading...the ones that work do not use the row groups.
Again, this only happens when posted to the web server. I have found a couple links that seem to be similar (one below), but wanted to see if anyone had experienced this.
ReportViewer export to PDF Null reference
I was able to find a fix that worked for me and resolved this issue, so hopefully it will help others that come across this question.
We were developing in VS2010 when we created our first rdlc using MS ReportViewer 2010. We have since upgraded to VS2013 and .Net 4.5 and we never touched our existing rdlc because everything continued to work. When we created the new rdlc's, we targeted MS ReportViewer 2010 again, however the new reports that were using the table control and row groups to group data within the table would fail when they were deployed to a web server.
What I did was I installed the MS ReportViewer 2012 Runtime (if needed) so that I could reference the newer dll. I then installed it on the web server as well. Note: You might be prompted to install Microsoft® System CLR Types for Microsoft® SQL Server® 2012. You can find the x86/x64 downloads near the bottom of the Install Instructions.
Once I re-published the updated website to the updated web server, everything worked without errors. I did notice that my formatting was a little different using 2012 than it was in 2010, but the changes required to resolve those differences were minimal.
Related
I have a chicken-egg-problem when upgrading from SSRS2014 to SSRS2016.
I cannot move to the new reportviewer because I still have users on
IE. The new report viewer cannot print nicely on Internet Explorer:
if you click print, you can download a pdf and THEN print it.
Due to the large amount of reports we print, this is no feasable option.
I cannot migrate away from Internet Explorer because of the old report
viewer: The ActiveX print control only works in Internet Explorer.
So I want to migrate to the new report server, yet show the reports through the old viewer for IE-users. So my test web server has both the new and the old reporting component. If the client uses Internet Explorer, I serve the old one. Otherwise, they get the new one.
In my test environment, reports from SSRS 2016 are rendered correctly by the old reporting control. (Microsoft.ReportViewer.WebForms version 11.0.0.0) However, when I try to print, the client displays a dialog box "Unable to load client print control"
On my server, an exception is thrown:
The report server could not find the internal resource '2015.130.1601.05rsclientprint.cab'. (rsInternalResourceNotFoundError)
[ReportServerException: The report server could not find the internal resource '2015.130.1601.05rsclientprint.cab'. (rsInternalResourceNotFoundError)]
Microsoft.Reporting.WebForms.SoapReportExecutionService.WritePrintCab(ClientArchitecture arch, Stream stream) +797
Microsoft.Reporting.WebForms.ServerReport.WritePrintCab(ClientArchitecture arch, Stream stream) +75
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +304
I know there is a new reporting control, making the ActiveX print control obsolete. However, I'd like to prevent a big bang implementation. Printing with the old control only works on Internet Explorer, so all users use IE. Printing with the new control DOESN'T work with IE.
(If 100+ users print 50+ reports a day, having to download a pdf and print that is a BIG difference.)
https://learn.microsoft.com/en-us/sql/reporting-services/report-server/enable-and-disable-client-side-printing-for-reporting-services says:
"Previous versions of Reporting Services used an ActiveX control that required downloading to the client computer from the report server. If you upgrade your report server to SQL Server 2016, the print control is not removed from the report server or client computers."
This suggests that ActiveX printing is also possible with the new server, probably through the old Report viewer control. If that works, I can put the new control next to the old one, and gradually migrate my users to a modern browser.
Did anybody get this to work without restarting and installing SQL Server 2014, and upgrading?
To migrate SSRS Reports from 2014 to 2016. Simply follow below steps:
Backup and restore original databases
Backup encryption key
Install Ssrs 2016 on new server with managed service account.
Restore databases and remove server key entry from key table in the report database.
Configure Ssrs 2016 to look at new restored databases on same new instance.
Restore keys from backup.
Or visit this link :https://www.mssqltips.com/sqlservertip/2692/migrating-sql-reporting-services-to-a-new-server-by-moving-the-reporting-services-databases/
I am building a substantial ASP.Net MVC app using the latest EF and MVC. Suddenly nothing works, every one of my index views now produces the following error when its generates the data to send to the index view:
System.InvalidOperationException {"Sequence contains no matching element"}
This is happening in code that was generated when I added a controller with views. It now effects ALL my index views and there are about 40 of them which all worked previously and now none of them work. The only thing I can think of is that I hit some limit as I am just adding very similar controllers.
I have found the cause of my problem. None of my previous work on this machine will work anymore. They haven't been changed and they were all working. The problem is that anything I run in Visual Studio (VWD 2013 and VS Community 2015) will NOT talk to SQL Express.
I became suspicious and removed the connection string from the problem App and got exactly the same message. I then thought I would try it with Apps that I know worked, but I ran them first before I made any changes and they (five different apps) all produced the same error.
Yet If I look at Server Explorer it still works and it is using the same Web.Config connection string, because when I remark it Server Explorer will not access the database.
As I said from the start this is some internal problem as all the code was generated by Visual Studio and then it all failed, and all my other working Apps fail as well.
I will now test it on a different machine.
I manually rebuilt it all and the problem appeared again when I added the last few Models. So that was not the solution. I got assisatnce on the ASP.Net forum from Krunal who provided a solution that worked and fixed both versions which had the problem.
I was working with Code First from the database. Krunal thought I was using Database first with Designer and suggested I use the Model Browser to refresh my model. You don't get a Model Browser if you used Code First so I added a Database First Design Model which created a EDMX file, I then right clicked on that and opened the Model Browser.
I then rebuilt it and it all worked. I then went back to the original version added an EDMX opened the Model Browser and it all worked fine. As I said from the start it was not a code issue it was an Internal problem with Visual Studio and SQL Express. No code was changed.
I have a report that I run in an ASP.NET application using the ReportViewer.Common and ReportViewer.Webforms. With the 2005 version (8.0.0.0) of the RDL file (renamed to RDLC), it worked fine in my ASP.NET web app. After upgrading the report to 2008 (10.0.0.0), my report no longer works.
Error is quite extensive, but ends with:
at Microsoft.ReportingServices.OnDemandProcessing.OnDemandProcessingContext.AbortHelper.ThrowAbortException(String reportUniqueName)
at Microsoft.ReportingServices.OnDemandProcessing.OnDemandProcessingContext.CheckAndThrowIfAborted()
at Microsoft.ReportingServices.OnDemandProcessing.RetrievalManager.FetchData(Boolean mergeTran
at Microsoft.ReportingServices.OnDemandProcessing.RetrievalManager.PrefetchData(ReportInstance reportInstance, ParameterInfoCollection parameters, Boolean mergeTran)
What I have done:
I have checked and all parameters for the report are being set.
I set all the data sources with valid DataTable objects. I've checked all the columns are present in my DataTable.
I have a SubReportProcessing event handler setup. The processing steps into this function and I set the necessary DataTable in that function with valid data. This works for each call to the subreport.
Unfortunately, the Report with subreport works fine in the BI Dev Studio. Go figure.
I can .LocalReport.Render() and get an Exception thrown, but the error is really deep in the .NET reporting engine, as described above.
I realize most would say I am missing a parameter. I could be.
How can I debug this report AFTER the subreport datasets have been supplied? Is there some level of tracing I can enable to get more out of the rendering engine?
Another question is: Is there a way to control the timeout of the SubReport Render? I have set the report script manager to 900 seconds (way high).
Thank you in advance for any guidance you might have on debugging this problem.
Dan
Dan.Zemmels#zcsi.net
Our web application used the old Crystal Reports XI Rel 2 activeX to render the reports called from classic ASP. We would like now to have it run alongside the new Crystal Reports 13 run time to render reports called from ASP.NET.
We installed the exe found in http://scn.sap.com/docs/DOC-7824 (support pack 3). On our dev machines (windows XP) everything went alright, and we were able to design and render reports in both technologies. We tried to deploy it today to a client's server (Windows Server 2008 64 bit) and it obviously didn't work.
If we first try to open the new report then the old one, they both fail, but with completely generic and therefore useless error messages ones like "Error while creating report". the new one is OK, but the old one fails with message "Invalid TLV record".
Inversely, if, after restarting iis, we first try to open an old report (CR XI R2 from classic ASP), it shows correctly, but the new one (CR 13) gives this error:
Retrieving the COM class factory for component with CLSID
{F734A321-8381-4FFD-A614-139E8906DC83} failed due to the following
error: 80000003 One or more arguments are invalid (Exception from
HRESULT: 0x80000003).
We tried to google this error; the only meaningful result was this thread but it didn't help us.
Thank you
EDIT: ok, the first error was simply that the .rpt files were being left out of the deployed folder. So it really boils down to an incompatibility of the CR runtimes, maybe?
EDIT 2: Yes, it is definitely it. We moved the new report in another virtual directory running under another application pool and now they both work, regardless of what is instantiated first. So is there any way we can gradually migrate our existing records, ie have a period where both run times coexist and are used by the same virtual directory?
I had this problem. As I had just installed CR 13 without a reboot, I thought I'd try a reboot of the server. After the reboot, the problem went away.
I have the same error - reboot didn´t help.
Installed SAP Crystal Reports runtime 13.0.0.99 on Win7 but got several errors registering components during installation - think that is the cause of the problem.
Downloaded and installed CR Runtime 13.0.21.2533 (32bit)
from
https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads
http://downloads.businessobjects.com/akdlm/crnetruntime/clickonce/CRRuntime_32bit_13_0_21.msi
That installed without errors but didn´t work either :-(
Okay, time for a stupid question.
When viewing the browser source code of a ssrs report there is a script tag that references Reserved.ReportViewerControl.axd. There is a query string parameter of the version. What installed component on the web server determines that version #? The reason I ask is I am trying to debug a situation where an installation of our web app (asp.net 3.5) cannot print a report ("Unable to load client control..."), but on our internal machines, we can. I do not have direct access to the web server/db server. I can confirm that I can print directly from the Report Manager. I am trying to piece together any differences b/t the two environments, and one thing I am noticing is the different version query string value.
Our internal says -
Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=9.0.30729.4402&Name=Microsoft.Reporting.WebForms.Scripts.ReportViewer.js"
Client says -
Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=9.0.30729.1&Name=Microsoft.Reporting.WebForms.Scripts.ReportViewer.js"
I am fairly sure it is the Microsoft Report Viewer Redistributable, but I want to make absolute sure. Anyone out there know?
This depends on whether you're using the .NET ReportViewer control on a custom ASP.NET page or whether you're simply using Reporting Services' out-of-the-box viewer. If it is the former, then most likely it's from the Report Viewer Redistributable. If it is the latter, it's from the SQL Server installation.
See if this SO post helps you with your print issue:
ReportViewer Client Print Control "Unable to load client print control"?