473,486 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Crystal report Export Error

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 btnShowPDF_Click event is triggered
private void btnShowPDF_Click(object sender, System.EventArgs e)

{

string
strFName="c:/inetpub/wwwroot/rglHG/admin/administrator/surveyReport/prtPrvwS
ctnTempQstn/prtPrvwSctnTempQstn.pdf";

ExportToDisk(strFName);

Response.Redirect("prtPrvwSctnTempQstn.pdf");

}

private void ExportToDisk (string fileName)

{

DiskFileDestinationOptions diskOpts = new

DiskFileDestinationOptions();

//set the export format

// Report.ExportOptions.ExportFormatType = ExportFormatType.RichText;

crstRptPPSctnTempQstn1.ExportOptions.ExportFormatT ype =
ExportFormatType.PortableDocFormat;

// Report.ExportOptions.ExportFormatType = ExportFormatType.WordForWindows ;

crstRptPPSctnTempQstn1.ExportOptions.ExportDestina tionType =
ExportDestinationType.DiskFile;

//set the disk file options

diskOpts.DiskFileName = fileName;

crstRptPPSctnTempQstn1.ExportOptions.DestinationOp tions = diskOpts;

crstRptPPSctnTempQstn1.Export ();

}

Error in File
C:\DOCUME~1\ITSDEV~1\ASPNET\LOCALS~1\Temp\temp_ad5 32a41-baf3-4cb4-b7d0-fff07
43b6782.rpt: Access to report file denied. Another program may be using it.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details:
CrystalDecisions.CrystalReports.Engine.LoadSaveRep ortException: Error in
File
C:\DOCUME~1\ITSDEV~1\ASPNET\LOCALS~1\Temp\temp_ad5 32a41-baf3-4cb4-b7d0-fff07
43b6782.rpt: Access to report file denied. Another program may be using it.

Source Error:

Line 96: crstRptPPSctnTempQstn1.ExportOptions.DestinationOp tions =
diskOpts;
Line 97:
Line 98: crstRptPPSctnTempQstn1.Export ();
Line 99: }
Line 100:

Source File:
c:\inetpub\wwwroot\rglHG\admin\administrator\surve yReport\prtPrvwSctnTempQst
n\pgPPSctnTempQstn.aspx.cs Line: 98

Stack Trace:

[LoadSaveReportException: Error in File
C:\DOCUME~1\ITSDEV~1\ASPNET\LOCALS~1\Temp\temp_ad5 32a41-baf3-4cb4-b7d0-fff07
43b6782.rpt:
Access to report file denied. Another program may be using it.]
.F(String  , EngineExceptionErrorID 
)
.A(Int16 , Int32 )
.@(Int16 )

CrystalDecisions.CrystalReports.Engine.FormatEngin e.Export(ExportRequestCont
ext reqContext)
CrystalDecisions.CrystalReports.Engine.FormatEngin e.Export()
CrystalDecisions.CrystalReports.Engine.ReportDocum ent.Export()

rglHG.admin.administrator.surveyReport.prtPrvwSctn TempQstn.pgPPSctnTempQstn.
ExportToDisk(String fileName) in
c:\inetpub\wwwroot\rglHG\admin\administrator\surve yReport\prtPrvwSctnTempQst
n\pgPPSctnTempQstn.aspx.cs:98

rglHG.admin.administrator.surveyReport.prtPrvwSctn TempQstn.pgPPSctnTempQstn.
btnShowPDF_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\rglHG\admin\administrator\surve yReport\prtPrvwSctnTempQst
n\pgPPSctnTempQstn.aspx.cs:79
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
stBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain() +1277

Nov 19 '05 #1
0 1754

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

Similar topics

1
8527
by: DeeCay | last post by:
Dear folks, I was trying to write a .Net web application (using C#) that loads a Crystal Report on server side, export the report in PDF format as a file in the web server, and then serves up...
1
2000
by: Stephanie Stowe | last post by:
I am doing a support rotation for our massive ASP app. We use Crystal Reports / Enterprise. By some magic which I am unfamiliar with Crystal Enterprise allows the creation of a report on the...
3
3633
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
13098
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...
3
2792
by: Russ | last post by:
I have a page that uses crystal reports to generate reports from a SQl server database. As of a week ago everything was working fine, but now I am all of the sudden getting errors. To the best of...
3
3774
by: Deasun | last post by:
I need some help please! Crystal is driving me nuts. Heres my code so far, see below. Problem: On the .export() line it comes back with error #5 Login failed! I know the login info is good so...
19
3844
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
2
14234
by: drisso | last post by:
Hello, I have searched that error on these message boards, msdn and crystaldecisions.com. I found tutorials that showed how to export a crystal report to pdf, but like many others I am getting...
1
3535
by: Hardy Wang | last post by:
Hi all, I have a piece of code in my C# console application to export from crystal report files to PDF. For some reports files, I get errors below. I have Crystal Reports 8.5 with service pack...
0
7100
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
7126
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6842
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
7330
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
5434
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
4865
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
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.