Crystal Reports Error Report "Download Failure Report" on the server

I get the error "load report failed" on the server, it works without errors on localhost. I am using VS 2008 with .Net 3.5.

This is my code:

ReportDocument reportDocument = new ReportDocument(); String filePath = @"C:\abcSpaces\abc.com\xyz.com\wwwroot\Order Fulfilment.rpt";//full path // I have tried OrderFullfilment.rpt and ~/OrderFullfilment.rpt and /OrderFullfilment.rpt try { reportDocument.Load(filePath); CrystalReportViewer1.ReportSource = reportDocument; } catch(Exception ex){ Label1.Text = ex.Message; } 

Part of an Aspx page:

 <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" Height="1291px" ReuseParameterValuesOnRefresh="True" Width="1125px" /> 

^ I tried using

 <CR:CrystalReportSource ID="CrystalReportSource1" runat="server"> <Report FileName="expenseRep_summary.rpt"> </Report> </CR:CrystalReportSource> 

without course evasion ...

web.config section for assembly references:

 <compilation debug="true"> <assemblies> <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="MySql.Data, Version=6.2.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/> <add assembly="MySql.Data.Entity, Version=6.2.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/> <add assembly="MySql.Web, Version=6.2.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/> <add assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> <add assembly="CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> <add assembly="CrystalDecisions.ReportSource, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> <add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.Framework, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.InfoStore, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/> <add assembly="CrystalDecisions.Data.AdoDotNetInterop, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> <add assembly="CrystalDecisions.VSDesigner, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/></assemblies> </compilation> 

I tried all of these solutions hosted on stackoverflow:

Failed to load CrystalReport report (no, I can not change the registry or reinstall crystal reports, my site is hosted on an external server)

Report loading error (where the hell is objReport?)

I have a problem in Crystal Report - Error Messsage: Error loading report (I do not have an object that returns a Report: S class)

Error loading report when implementing Crystal Report in asp.net 3.5 (I tried this technique "~" + Absolute path and no one works)

Error loading report in Windows Server 2003 (I set write permissions for each file)

https://stackoverflow.com/questions/3337185/crystal-report-giving-load-failed-error (this guy, like me, has not yet found a solution: P)

So please, please help me! Or my client will eat me alive ...

+6
source share
5 answers

I know this is an old post. but for those who are still looking for an answer:

You need to register crystal reports in page layout

 <% @ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %> 

Set the Copy to Output Directory property of the Copy Always report

The file path in the crystalreportsource file will be ~ / bin / YOURFOLDER / YOURFILE

 <CR: CrystalReportSource ID ="CrystalReportSource1" runat ="server"> <Report FileName="~/bin/oilmovement/rptOMDayEnd.rpt"> </Report> </CR: CrystalReportSource> 

Now the report should work

+4
source

I have the same problem before, and you think you need to install CR runtime on the server. Only a DLL is not enough. Hope this helps.

+1
source

I know this is an old question, but today I had a similar problem. The reports worked locally, but when deploying to a server (IIS) I had the same error.

Try adding write / read permissions to% TEMP% for the IIS user (the process that creates the reports).

Reports are generated in Temp, and from there the viewer receives the content displayed on the site.

+1
source
  • Select the application pool for your application or website.
  • Click Recycle (right sidebar)
  • Reduce the value of the regular time interval from 1740 to 20 minutes or set the desired value.
  • this will free up any resource held by iis.
  • restart iis.

Hope this fixes your problem.

http://littleprograming.blogspot.com/2013/02/crystal-report-error-load-report-failed.html

+1
source

I also had this problem, and after exhausting all the other parameters, the settings of the Load User Profile application pool changed from False to True, which fixed the problem.

This was an application that was deployed on dozens of IIS6, IIS7, IIS7.5 servers, and we had never encountered this problem before. The application pool was started with the network identification service (which is usually present), and I first tried to give permission to C: \ windows \ temp, which did not work (although I did not check if this was the temp directory).

I suspect that another solution might have been to add Network Service to the IIS_IUSRS group, but I did not try this and really did not want to do this if it affected other applications on the server.

+1
source

Source: https://habr.com/ru/post/893910/


All Articles