How to dynamically set the export path?

Posted by Laghaterohan under ASP.NET on 4/22/2011 | Points: 10 | Views : 2275 | Status : [Member] | Replies : 4
Hello,

I am using ExportToDisk() method to save my crystal report in the pdf format.
Refer below:

MyReport.ExportToDisk(ExportFormatType.PortableDocFormat,"C:\MyReport");
// Here the file is successfully saved to my C Drive with title as My Report.

However, my question is how to set the export path dynamically? ie. How to save the path (here C:\) Dynamically? ie...Like prompt a user to select the location where he wants to save the file? How can this be done?
I am using this work around because ExportToHttpResponse does not seem to work...please help.

Please help....

Best Regards,
Rohan Laghate



Responses

Posted by: Prabhakar on: 4/22/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Laghaterohan

i am not sure but you try it . .

string add;
add="D:\LocalFolder";

MyReport.ExportToDisk(ExportFormatType.PortableDocFormat,"add + MyReport");

& u want to set address by user . . so use by textbox .
add=txtaddress.text;
MyReport.ExportToDisk(ExportFormatType.PortableDocFormat,"add + MyReport");

Best Regard's
Prabhakar

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Laghaterohan on: 4/22/2011 [Member] Starter | Points: 25

Up
0
Down
Hello,
But i will not be knowing what will be the scenario on the clients machine..also, what if there are some security issues? And ofcourse it will not be possible to the user to type the address where he wish to save the file.....so is there any way around? Please help...its urgent


Best Regards,
Rohan Laghate

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 4/22/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
hi Laghaterohan

try to open Save as Diloge box on Client machine . .


Best Regard's
Prabhakar

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vforvijay on: 4/22/2011 [Member] Starter | Points: 25

Up
0
Down
hi..
BY using FolderBrowser toolbox ,By using this one you can get destination to save and store the destination in an variable..
http://vbdotnetaddict.blogspot.com/

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response