?
Solved

Problem saving a file from a web site

Posted on 2005-05-10
4
Medium Priority
?
196 Views
Last Modified: 2010-04-07
Hi,

 I have a crystal report in an ASP.net app which is exported to PDF format to path C:\Temp\ but when the page is accesed from users' PC the file is stored at C:\Temp\ of my web server and not user's PC's

 How can I make my file to be exported or saved on my user's PC

This is my exporting code

ExportPath = "C:\Temp\";

crDiskFileDestinationOptions.DiskFileName  = ExportPath + "RMA_Report.pdf";
crExportOptions = rpt.ExportOptions ;                        
                        
crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;

rpt.Export();  

Thanks in advance
0
Comment
Question by:negreteo
  • 2
4 Comments
 
LVL 33

Accepted Solution

by:
raterus earned 2000 total points
ID: 13969296
Ask yourself, when is the last time that a website has saved a file to your computer, and they told you where they put it?  I certainly hope it is "Never"!   Websites will never have that type of access to your personal computer, that breaks about every security rule out there!

You can "suggest" they save it, but you can't force them.  I've put the code I use to export a crystal report here, I hope you find it usefull!
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21412852.html
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 13969524
raterus is 110% right on the money.
0
 

Author Comment

by:negreteo
ID: 13970167
I am developing in c#

Don't you have it in C#

Anyway I'll try to translate it and test it
0
 
LVL 33

Expert Comment

by:raterus
ID: 13970205
Sorry I don't.  Thank you for taking the initiative to translate, I wish other people would do that!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Screencast - Getting to Know the Pipeline
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question