Re: Export from crystal report to pdf
From: Mandar (shree_at_nospam.nospam)
Date: 07/28/04
- Next message: DujHoD: "Re: dynamic form generatio"
- Previous message: Kevin Spencer: "Re: User Identity"
- In reply to: Craig Deelsnyder: "Re: Export from crystal report to pdf"
- Next in thread: Craig Deelsnyder: "Re: Export from crystal report to pdf"
- Reply: Craig Deelsnyder: "Re: Export from crystal report to pdf"
- Messages sorted by: [ date ] [ thread ]
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
>
- Next message: DujHoD: "Re: dynamic form generatio"
- Previous message: Kevin Spencer: "Re: User Identity"
- In reply to: Craig Deelsnyder: "Re: Export from crystal report to pdf"
- Next in thread: Craig Deelsnyder: "Re: Export from crystal report to pdf"
- Reply: Craig Deelsnyder: "Re: Export from crystal report to pdf"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|