Save dialog file name

Stimulsoft Reports.Silverlight discussion
Locked
fama_0
Posts: 15
Joined: Mon Dec 06, 2010 3:24 pm

Save dialog file name

Post by fama_0 »

Is there a property either on the viewer or the report that I can set to prefill the save dialog's file name field? If not I'm sure I could intercept the save event and handle it that way, but I wanted to make sure I wasn't missing anything that already exists.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Save dialog file name

Post by Andrew »

Hello,

Do you want to redefine our event and do your own?

Thank you.
fama_0
Posts: 15
Joined: Mon Dec 06, 2010 3:24 pm

Save dialog file name

Post by fama_0 »

I want everything to work like it currently does, but be able to specify the file name so that the user does not have to fill anything in when saving. If you don't have a property for that then could I please get an example of the current saving code. Thank you.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Save dialog file name

Post by Andrew »

Hello,

In general it is prohibited in the Silverlight security policy to set a default file name in the SaveFileDialog, as it could be done in .NET. Here we make our class, which is responsible for saving a report.
Please see the attached file.

Thank you.
Attachments
728.StiSLReportSaveDialog.cs
(3.64 KiB) Downloaded 448 times
fama_0
Posts: 15
Joined: Mon Dec 06, 2010 3:24 pm

Save dialog file name

Post by fama_0 »

Thank you. Could you also post the code used to save a rendered report to a pdf? That's really the only one that the user will be allowed to do. Since setting the default filename is not allowed in Silverlight yet, I'll just ask if the user wishes to put the recommended filename in the clipboard before going into the save dialog.
Anton Lozovskiy
Posts: 135
Joined: Tue Aug 11, 2009 9:38 am

Save dialog file name

Post by Anton Lozovskiy »

Hello,

>>Thank you. Could you also post the code used to save a rendered report to a pdf? That's really the only one that the user will be allowed to do.
Call the InvokeReportSavePdf () method of StiSLViewerControl for the export to PDF.


>>Since setting the default filename is not allowed in Silverlight yet, I'll just ask if the user wishes to put the recommended filename in the clipboard before going into the save dialog.
We create an example for you, please see.

Thank you.
Attachments
732.SilverlightApplication1.zip
(6.26 KiB) Downloaded 340 times
Locked