Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Crystal Reports for VS.NET
This is the forum to discuss the Wrox book Professional Crystal Reports for Visual Studio .NET by David McAmis; ISBN: 9780764544033
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Crystal Reports for VS.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 5th, 2004, 01:03 PM
Registered User
 
Join Date: Feb 2004
Location: Newport, RI, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exporting a report to PDF format

I am following the code on page 143 and 144 to export a report to pdf format. When I run it I get this error:

Error in File C:\DOCUME~1\VIVEIR~1\ASPNET\LOCALS~1\Temp\temp_a7e 994e5-1b08-4f48-95ec-80faf59faaed.rpt: Access to report file denied. Another program may be using it.
 
Old July 19th, 2004, 11:33 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah.. I am getting the exact same problem.. I don't know if you fixed this yet or not... if anyone knows how to get around this let me know,

Brian

 
Old October 1st, 2004, 08:33 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by veeves
 I am following the code on page 143 and 144 to export a report to pdf format. When I run it I get this error:

Error in File C:\DOCUME~1\VIVEIR~1\ASPNET\LOCALS~1\Temp\temp_a7e 994e5-1b08-4f48-95ec-80faf59faaed.rpt: Access to report file denied. Another program may be using it.
Is this in a web page? If so, I'm assuming it's running under the ASPNET account which probably doesn't have access to write to that directory.

Go to the TEMP directory and right click on it and select the Properties item. Look for ASPNET and see if it has read/write access to the directory and the files underneath. That is probably the problem.

You could also allow the EVERYONE group to have read/write access to it, but that's not a safe option.

 
Old October 5th, 2004, 09:48 AM
Registered User
 
Join Date: Aug 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How are you naming your pdf file? Try:

strFileName = System.IO.Path.GetTempPath & Session.SessionID.ToString() & ".pdf"

That works for me.

I have another problem though:

I am applying filter to the Crystal Reports Viewer using the "SelectionFormula" property, this works fine, but the export ignores it. I have tried using the "DataDefinition.RecordSelectionFormula" of my report object and then refreshing it, but that doesn't seem to do anything!!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting gridview to pdf format priyan.viji C# 2005 0 December 12th, 2007 06:30 AM
Code for Exporting Crystal Report to Excel or PDF shakti_2505270 ASP.NET 2.0 Professional 1 October 4th, 2007 01:00 AM
Exporting Report to CSV format. chakravarthy_vr Reporting Services 4 March 20th, 2006 07:27 AM
problem in Exporting Crystal report to PDF cat_net Crystal Reports 0 October 3rd, 2005 11:49 PM
Exporting Crystal Report to PDF vishal.jayaswal .NET Web Services 0 December 30th, 2004 03:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.