473,513 Members | 2,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Export from crystal report to pdf

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
Nov 18 '05 #1
4 3731
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/de...ationtopic.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
Nov 18 '05 #2
On 7/28/2004 12:24 PM, Mandar wrote:
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/de...ationtopic.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


sorry, that's all I had; it's been awhile since I've done CR, and I
thought this fixed my problem like this back then. I didn't notice by
default that was set. You might try the CR forums at http://asp.net or
the CR developer zone at:

http://www.businessobjects.com/products/dev_zone/

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #3
Hi Mandar,

In addition to Craig's suggestion. You can also ask the Crystal Report
service support through the guides in the following kb article:

#How To Get Help with Crystal Reports - International and U.S.
http://support.microsoft.com/?id=100368

Thanks.
Thanks.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #4
3 steps cleared this up for me.

1) You need to set in InetMgr the folder you are exporting to to be Write
enabled.
2) Also in InetMgr, under the porperties for your export folder, you need to
set the Application Pool setting to: MSSharePointAppPool.
3) And finally, you need to set, under Windows Explorer, the security level
for the export folder to Everyone=Full Control.

This should clear you up....did for me when I had this *exact* same problem.

But don't take just my word for it:
http://dotnetjunkies.com/WebLog/rich.../24/14362.aspx

-- Andrew
"Mandar" <sh***@nospam.nospam> wrote in message
news:CA**********************************@microsof t.com...
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-a2189
ee212ac.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

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1678
by: Tim Jones | last post by:
Hey all, I am trying to try get a crytal report running properly. A "Hello World" report that does not add criteria to the record selection formula of the report (either in the development tool,...
3
3638
by: Colin Graham | last post by:
Error when attempting to export Crystal Report as PDF document asp.net. I get the following error. Error in File...
6
13103
by: Robin Cushman | last post by:
Hi all, I need some help -- I'm working with an A2K database, using DAO, and am trying to read records into a Crystal Report and then export it to a folder on our network as an Excel...
1
3931
by: John | last post by:
Hi. Sir: Does anyboday know how to export subreport data using the export button in crystal report tool bar? We have a main report including a on-demand report. When we click the on-demand...
0
1831
by: suicidaltendencies | last post by:
I'm able to view the report, but when I click the button on the webpage that shows the report to export into a different format it gives me an error on Export. Any help would be great I keep...
0
1757
by: Leonard Danao | last post by:
Anyone have any ideas as to why this is happenning. There are no other versions of Crystal installed aside from the one that came with vs2003 enterprise. the error happens when the...
1
1590
by: ElanKathir .S.N | last post by:
Hollo Guys, I want to export my crystal reports (Crystal Report 9.0) to word format using visual basic 6.0. Means I want to export the reports with out preview. Now showing report using...
0
2686
by: Henry | last post by:
I have written an ASP/VB.Net application via VS 2003 (Crystal V9) that uses MS Access 2000 as its database. I can export reports that have no linked sub reports for printing. However, I'm unable...
3
5138
by: Brad | last post by:
In a Vista/IIS7 asp.net app, a coded crystal report export is crashing IIS7....but it works just fine in visual studio's cassini web server. And if I create a web form and use the crystal...
3
6329
by: acextreme | last post by:
Hi all, I have a big problem when I try to export from Crystal Report 8.5 in .pdf from VB6. I use a database made in SQL Server 2000. The problem is that all the decimal fields in database are...
0
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7111
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7539
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5692
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5095
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.