Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Invalid report file path.

$
0
0

Hi ,

We have written below code to export the crystal report data to .RTF format.

 ReportDocument rdoc = new ReportDocument();
strCmd = "select * from ff_cca_notes where ff_issue_id = " + sIssueID;
                da = null;
                da = new AseDataAdapter(strCmd, conn);
                da.Fill(ds.ff_cca_notes);

             rdoc.Load(Server.MapPath("OrderDetails.rpt"));
             rdoc.SetDataSource(ds);

 
rdoc.ExportToDisk(ExportFormatType.RichText, "c:\test"+ @"\" 100135.rtf");

in the above ,when I debug the code,i can able to export the report data to RF T format.

But when I publish the code and try to export the data ,we are getting below error .

An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code           

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[LoadSaveReportException: Invalid report file path.]
   CrystalDecisions.CrystalReports.Engine.ExceptionThrower.ThrowEngineException(String messageID, EngineExceptionErrorID id) +362
   CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +260
   CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport() +151
   CrystalDecisions.CrystalReports.Engine.ReportDocument.get_FormatEngine() +161
   CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName) +278
   CASETools.PrintOrder.btnExport_Click(Object sender, EventArgs e) in C:\Users\dudisr03\Desktop\June 23 2016 code With 1442 and 1463\PrintOrder.aspx.cs:684
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +155
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804


Kindly help me to identify the issue.

Viewing all articles
Browse latest Browse all 1507

Trending Articles