Export generates a PDF file of 0 KB

Posted on 2007-10-08
Last Modified: 2008-01-09
Hi Experts,

I am using Crystal Reports 9 (8.5 upgraded to 9) on Windows 2003 machine.

I am using the following code to export a report to PDF:


session("ExportOptions").DiskFileName = session("ExportFileName")

session("ExportOptions").FormatType = cint(ExportType)

session("ExportOptions").PDFExportAllPages = TRUE

session("ExportOptions").DestinationType = 1

On Error Resume Next

Session("oRpt").Export False


When the above code executes, a PDF file is generated wiht size of 0 KB. Same code is working fine on Windows 2000 Server.

Kindly advice how to get ride of this 0 KB file size problem ? This is urgent.

Question by:imrancs
    LVL 42

    Accepted Solution

    Sounds like there is a permissions issue related to the export dll.  Since the pdf file is created but not completed I would guess it has to do with the export dll connecting back to the database.  In my experience with Win2003 I think this is likely do to Network Service identity not having access to a specific folder on your server.

    I suggest you download the free MS filemon tool and run it while you execute this code so you can see where the permission is being denied.  Filemon is a standalone executable that doesn't install so you can run it to watch your server and then delete the .exe when you're finished with it.

    LVL 10

    Author Comment


    Thanks for your suggestion. Although, I got my problem solved some other way i.e. running the IIS 6 in IIS 5 isolation mode, but your suggestion give me a way to debug dll permissions issues.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
    This video discusses moving either the default database or any database to a new volume.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now