Fog Creek Software
Discussion Board

Crystal Reports is driving me insane...

...well, mostly just the "support" website.

I have spent the morning trying to find an answer to the following question on the whole internet using Google, there seems to be a link sink at where all the google results seem to go to but none of that has proved very useful at all.

The question is:
"Can we use the Crystal Report Application Server / Crystal Enterprise 9 to run a report to a PDF file without actually adding the .RPT to the report server?"

I.e. we want to be able to pass a path like "C:\somereport.rpt" to it rather than an ID of a report in the repository. In effect we want to be able to run a report to a PDF file without having to add it to the repository.

The reason being is that we have always just used the CrystalRuntime.Application.9 object that is installed with Crystal9 Advanced edition to run reports, but now one of our customers is wanting us to modify the program for them to use Crystal Enterprise 9 (or 10) rather than have to buy a licence for Crystal Advanced 9 for $3000, but from my attempted research this morning, it is looking like it is going to cost way more than $3000 in customisation costs to get this working.

Another question which I haven't been able to find an answer to and will help me delay having to download the version 10 demo, will our reports all need to be redone when going from 9 to 10 like they had to be for 8.5 to 9? (Between 8.5 and 9 they also conveniently changed the ProgIDs as well)

Thanks in advance.

I really can't wait until we can switch away from Crystal reports at the end of this year this is killing me. On that topic, have poeple had better experiences using ActiveReports than Crystal?

Chris Ormerod
Wednesday, April 14, 2004

Welcome to the club. I worked with Crystal Reports once. Was reporting front end to SunSytems Accounting package.

Lost my hair and found God!

In response to the original question, where is Philo when you need him?

Thursday, April 15, 2004

You can guess what philo PMed to me via email.

If only our customers could like SQL Server Reporting Services as much as me. 

Chris Ormerod
Thursday, April 15, 2004

Hi Chris,
    I currently work for Crystal/Business Objects although I don't have much to do with the Reports side (and I won't be here much longer anyway - they're closing this dev site), so I don't have an answer to your first question.  There are Reports and Enterprise forums full of knowledgeable people at that could probably help you though.

What was it that forced you to recreate your reports switching from 8.5 to 9?  The progID changes?  I've got v10 installed on the box that I'm on now if there's anything specific that you want me to check.

Thursday, April 15, 2004


I'm using ASP.NET, and I pop up a report in PDF format like this:

ReportDocument oRpt = new ReportDocument();
oRpt.SetDatabaseLogon(username, pwd);
exportReport(oRpt, ExportFormatType.PortableDocFormat);

The function for exportReport() looks like this:

protected void exportReport(ReportDocument     selectedReport, ExportFormatType eft){
string contentType = "";
string tempFileName = "C:\temp\" + Session.SessionID.ToString();
    switch (eft){
        case PortableDocFormat :
            tempFileName += ".pdf";
            contentType = "application/pdf";
        case WordForWindows :
            tempFileName += ".doc";
            contentType = "application/msword";

    DiskFileDestinationOptions dfo = new DiskFileDestinationOptions();
    dfo.DiskFileName = tempFileName;
    ExportOptions eo = selectedReport.ExportOptions;
    eo.DestinationOptions = dfo;
    eo.ExportDestinationType = ExportDestinationType.DiskFile;
    eo.ExportFormatType = eft;

    Response.ContentType = contentType;


hope that helps.

Thursday, April 15, 2004


There was a change in the format of reports between 8.5 and 9 that forced us to open up and adjust all our >200 reports and resave them. It was only minor effort, but  a MAJOR PITA. The ProgId changes just forced us to change some of our code.

But the major issue from 8.5 to 9 was that we started getting a whole bunch of C00005 errors in our VFP7 code (anybody who has done VFP dev knows about those errors - they happen because VFP doesn't like COM and ActiveX very much) but we managed to work around them by changing all our code.

But I will have a look at that forum you pointed out.


We are currently using Visual FoxPro 8, but your code does look familiar from when I have done reports in .Net. Are you using Crystal Enterprise (RAS) or are you using the Crystal Reports that came with VS.Net? The classes you are using don't seem to be a part of Crystal Enterprise.

Chris Ormerod
Thursday, April 15, 2004


I'm using Crystal Reports Developer 9.  Sorry, I didn't realize you were using FoxPro.

Thursday, April 15, 2004

Thanks anyway nathan, I suspected that based on the classes you are using. We are using the same ones in our current code but those classes aren't available in Crystal Enterprise.

Chris Ormerod
Thursday, April 15, 2004

youd have to execute the rpt file via the shell and output pdf

The Artist Formerly Known as Prince
Friday, April 16, 2004

*  Recent Topics

*  Fog Creek Home