Question : How do I remove "rassdk://" from Crystal Report Filename property?

I have a windows .net application that generates a report using the Crystal ReportDocument object. I have Crystal XI.  
The program is setting the Filename property of the ReportDocument to:
      crysReport.Filename = "\\appdata\reports\myreport.rpt"
But after executing the above statement.  crysReport.Filename will contain:
     "rassdk://\\appdata\reports\myreport.rpt"
Which results in an "Invalid report path" error.
I tried using the String.Replace command to get rid of the "rassdk://" to no avail.
How do I resolve this?

Answer : How do I remove "rassdk://" from Crystal Report Filename property?

I understand the problem and it does that in my program as well.  I use the method I posted earlier and have no problems.  
crysReport.FileName will always include the rassdk:// so you have to set a value to the fixed file name and then load the report
cyrsReport.load(CleanCrystalReportFileName(crysReport.FileName))

You could also verify the path is accurate (system.io.file.exists(CleanCrystalReportFileName(crysReport.FileName))


If that doesn't help, can you post the code where the error occurs?

Random Solutions  
 
programming4us programming4us