Re: Export from crystal report to pdf

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mandar (shree_at_nospam.nospam)
Date: 07/28/04


Date: Wed, 28 Jul 2004 10:24:10 -0700

Thanks Craig for reply
by default it opens as temporary copy.
it does not give any error if i try word document instead of pdf.
i m not using load() anywhere
Regards

"Craig Deelsnyder" wrote:

> On 7/28/2004 11:18 AM, Mandar wrote:
>
> > I am trying to export crystal report to pdf. but i am getting folloing error: "Error in File C:\DOCUME~1\MKM-BA~1\ASPNET\LOCALS~1\Temp\temp_0c6b2c59-df8a-4b26-a570-a2189ee212ac.rpt: Access to report file denied. Another program may be using it."
> >
> > It works with other reports but not this one.
> >
> > Code using for export:
> > Dim myExportOptions As CrystalDecisions.Shared.ExportOptions
> > Dim myDiskFileDestinationOptions As CrystalDecisions.Shared.DiskFileDestinationOptions
> > Dim myExportFile As String
> >
> > myExportFile = "c:\inetpub\wwwroot\" & Session.SessionID.ToString & ".pdf"
> > myDiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions
> > myDiskFileDestinationOptions.DiskFileName = myExportFile
> > myExportOptions = crystalReport31.ExportOptions
> > With myExportOptions
> > .DestinationOptions = myDiskFileDestinationOptions
> > .ExportDestinationType = .ExportDestinationType.DiskFile
> > .ExportFormatType = .ExportFormatType.PortableDocFormat
> > End With
> > crystalReport31.Export()
> >
> > Thanks in advance
> > Mandar
>
> When you load the report (crystalReport31.Load(..)), there's an overload
> for that method, that has a parameter to indicate how to open the report:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/crystlrf/html/crlrfopenreportmethodenumerationtopic.asp
>
> if you use the temp copy option, it should not lock the report when you
> open it, which is what I think is happening.
>
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET
>



Relevant Pages

  • Re: Form with "unique number"
    ... I innitially tried to load the form and report ... after reading your post for about the 4th time did I realize that I should ... record in the command button that opens the report: ...
    (microsoft.public.access.forms)
  • Re: Export from crystal report to pdf
    ... > by default it opens as temporary copy. ... >>When you load the report ), ... >>Craig Deelsnyder ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: questions for an onclose report?
    ... in your report proerties there load and unload events, ... >>> I have a report that I use for order entry, when the user opens the ...
    (microsoft.public.access.reports)
  • Multiple generations of report
    ... OpenArgs parm for each one from VB code. ... when the report is open ... the first time, and the subsequent "opens" try to launch the report, the open ... event doesn't fire so I can't load the parms or open the same report more ...
    (microsoft.public.access.reports)
  • RE: Importing Data for use in report
    ... A report record source is based on the name ... you now have a Macro (or will with the additional info ... I am importing .TXT files....and for this particular database they will ... opens the report using my sample Test.txt. ...
    (microsoft.public.access.reports)