Previous Thread:   CR10 ODBC: Missing tables in list of available tables

6/24/2005 11:21:13 AM    LoadSaveReportException on Web Application
A QTip from Zack at Q1 Technology...  
  
I was encountering a "LoadSaveReportException" with very little helpful  
  
information in the error (see below).  I found a lot of newsgroup  
  
discussions on it, but only found one obscure reference to the actual  
  
cause.  Here is an explanation and the solution:  
  
Symptom:  
  
You have a web application with embedded Crystal reports.  You've  
  
deployed the application on a production Web server with the  
  
appropriate merge-modules to resolve the KeyCode license issue.  When  
  
you attempt to access a report, you encounter the following error:  
  
/*************************************************************/  
  
CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Load  
  
report failed.  
  
at .F(String  , EngineExceptionErrorID   
  
)  
  
at .B(String , Int32 )  
  
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String  
  
reportName, OpenReportMethod openMethod, Int16 parentJob)  
  
at CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String  
  
reportName, OpenReportMethod openMethod, Int16 parentJob)  
  
at CrystalDecisions.CrystalReports.Engine.ReportDocument.'()  
  
at  
  
CrystalDecisions.CrystalReports.Engine.ReportDocument.get_Database()  
  
at  
  
fplcombosample.q1technology.com.ComboSampleReportViewer.GetCrystalPdfReport=  
  
()  
  
in c:\documents and  
  
settings\administrator\vswebcache\fplcombosample.q1technology.com\combosamp=  
  
lereportviewer.aspx.cs:line  
  
76  
  
/*************************************************************/  
  
Solution:  
  
Find the temporary folder used by crystal and grant full rights to the  
  
proper account.  I know, it sounds obscure...but there seems to be a  
  
difference between Windows 2000 and Windows 2003 when it comes to these  
  
items.  Windows 2000 seems to use a temporary folder in c:\documents  
  
and settings\computer name\...  and it needs ASPNet to have access.  
  
Windows 2003 uses c:\windows\temp and needs "Network Service" to have  
  
access.  
  
Explanation/Recommendations:  
  
Although Crystal may have access to the actual RPT file you want to  
  
open, it actually creates another RPT file in a temporary directory to  
  
render the report.  Although I ran the web app with Impersonation that  
  
gave me Administrator rights to the box, it still gave me the error.  
  
The temporary file written by crystal has a GUID-like file name and an  
  
RPT extension.  Search the Web Server for *.rpt and note the number and  
  
location of the files.  It you feel gutsy, delete the GUID.rpt files  
  
you don't need.  Attempt to run the report, then note the new guid  
  
files and their location.  
  
On the new <GUID>.rpt file, check the security privileges.  You may  
  
find an account that only has "Special" privileges.  That would be the  
  
account that needs modify/write/read/delete rights to the folder that  
  
the file <GUID>.rpt file is in.  
  
Hope this helps someone!  
  
Zack Jones  
  
Chief Architect  
  
Q1 Technology  
  
Q1 Technology helps businesses operate more efficiently by developing  
  
custom software to enhance communications and workflow.