WCFService.WCFExportDocument - SaveFileDialog and Autoscale of Images

Stimulsoft Reports.Silverlight discussion
Locked
dstoermer
Posts: 14
Joined: Tue Sep 20, 2011 12:34 am

WCFService.WCFExportDocument - SaveFileDialog and Autoscale of Images

Post by dstoermer »

Good morning to all,
Currently we are evaluating the Stimulsoft library for our current project.
To some things we still have a question and hope that you can help us?
We use the Silverlight components for the frontend and download the reports and data via WCF that works flawlessly so far!
However, when I print a report to PDF, as expected, their appears a SaveFileDialog, and then the report is created and saved to the harddrive.
When you save a report as a PDF, or DOCX according to the example projects (Silverlight/WCF Samples) at the end a SaveWindow-Dialog appears, which triggers the SaveFileDialog, this is for the user handling somewhat unhappy, and also causes unnecessary data-traffic in my eyes.
Since the data is always loaded first from the server when it was loaded in the sample project, the SaveWindow-Dialog appears and on confirmation, the data are written to the harddrive.
Do you have a tip, hint or an idea for how we can trigger the SaveFileDialog before the WCF call is done?
A simple call will not work because the SaveFileDialog must be triggered by the user, apparently through an event (sample project SaveWindow-diloag button click event).
We have currently subscribed to the following event Stimulsoft.Report.StiOptions.Silverlight.WCFService.WCFExportDocument, within this event, it is not possible to open the SaveFileDialog.
And opening a SaveWindow-Dialog before the WCF-Call which triggers the SaveFileDialog, would work I think, but is not particularly nice, but would reduce the traffic.
What we actually want is to mimic the same behavior as in the case print a report as PDF.

The last question would be how we manage that scale images embedded in a report itself depending on the zoom factor?
Do we need this one specifically provided image type or do we need any special settings?

I hope that someone can help us with this issue!
I wish you all a nice day!

kind regards
dstoermer
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

WCFService.WCFExportDocument - SaveFileDialog and Autoscale of Images

Post by HighAley »

Hello.
dstoermer wrote:Currently we are evaluating the Stimulsoft library for our current project.
To some things we still have a question and hope that you can help us?
We use the Silverlight components for the frontend and download the reports and data via WCF that works flawlessly so far!
However, when I print a report to PDF, as expected, their appears a SaveFileDialog, and then the report is created and saved to the harddrive.
When you save a report as a PDF, or DOCX according to the example projects (Silverlight/WCF Samples) at the end a SaveWindow-Dialog appears, which triggers the SaveFileDialog, this is for the user handling somewhat unhappy, and also causes unnecessary data-traffic in my eyes.
Since the data is always loaded first from the server when it was loaded in the sample project, the SaveWindow-Dialog appears and on confirmation, the data are written to the harddrive.
Do you have a tip, hint or an idea for how we can trigger the SaveFileDialog before the WCF call is done?
A simple call will not work because the SaveFileDialog must be triggered by the user, apparently through an event (sample project SaveWindow-diloag button click event).
We have currently subscribed to the following event Stimulsoft.Report.StiOptions.Silverlight.WCFService.WCFExportDocument, within this event, it is not possible to open the SaveFileDialog.
And opening a SaveWindow-Dialog before the WCF-Call which triggers the SaveFileDialog, would work I think, but is not particularly nice, but would reduce the traffic.
What we actually want is to mimic the same behavior as in the case print a report as PDF.
We can't remove SaveWindow, because user must click any button to open SaveFileDialog otherwise an exception occurs (Silverlight protection).
It is impossible to call SaveFileDialog earlier because there is a time limit on using Stream for saving data and a duration of exporting is unknown.
dstoermer wrote:The last question would be how we manage that scale images embedded in a report itself depending on the zoom factor?
Do we need this one specifically provided image type or do we need any special settings?
There are no settings. We have no perfect code for resizing images due to Silverlight restrictions. Therefore if you need good images after export we advise you to set right size of images.
Unfortunately, we still can't do anything to change for the better.

Thank you.
dstoermer
Posts: 14
Joined: Tue Sep 20, 2011 12:34 am

WCFService.WCFExportDocument - SaveFileDialog and Autoscale of Images

Post by dstoermer »

Hello Aleksey,
thank you very much for your quick reply!

I made some screenshots, perhaps my question has been misunderstood!

Screenshot01:
Image
Link:http://img708.imageshack.us/img708/5571/screen01gs.jpg

Navigation-Bar Print-->Print to PDF

Screenshot02:
Image
Link:http://imageshack.us/photo/my-images/638/screen02tr.jpg

Normal expected Silverlight behavior, to choose a destination for the file!

Screenshot03:
Image
Link:http://imageshack.us/photo/my-images/832/screen03zs.jpg

Navigation-Bar Save-->Adobe PDF File

Screenshot04:
Image
Link:http://imageshack.us/photo/my-images/819/screen04z.jpg

Not expected Silverlight behavior --> Save as Dialog must be triggered from the SaveWindow.

At your WCF Silverlight examples, you send the XML to the server, where the content is rendered into the selected File (e.g. PDF, docx, etc.) and send the byte-array back to the Client.
When I look at your non-WCF Silverlight examples, you have the Report-Files embedded into the Silverlight project and from there you can make a quite normal SaveFileDialog, as expected.

If it is not possible to make the WCF Samples to act like we expected, can we combine the two Projects? Report-File on the Server is sent to the client and the Document-Save actions are done on the client not on the server, we don't want to embedd the Report-Files on the client!

------------------
To your second reply perhaps my question has been misunderstood, too!

We use good fitting images for the reports (e.g. DIN A4), but the SIlverlight zoom-function in the viewer works very good for the text, but not for the images, later on the report the images are good, but while you are in the preview mode, the don't scale automatically like the normal text.

I hope you can help us.
I wish you a nice day.

Kind regards
Daniel
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

WCFService.WCFExportDocument - SaveFileDialog and Autoscale of Images

Post by HighAley »

Hello, Daniel.
dstoermer wrote:I made some screenshots, perhaps my question has been misunderstood!

Screenshot01:
Image
Link:http://img708.imageshack.us/img708/5571/screen01gs.jpg

Navigation-Bar Print-->Print to PDF

Screenshot02:
Image
Link:http://imageshack.us/photo/my-images/638/screen02tr.jpg

Normal expected Silverlight behavior, to choose a destination for the file!

Screenshot03:
Image
Link:http://imageshack.us/photo/my-images/832/screen03zs.jpg

Navigation-Bar Save-->Adobe PDF File

Screenshot04:
Image
Link:http://imageshack.us/photo/my-images/819/screen04z.jpg

Not expected Silverlight behavior --> Save as Dialog must be triggered from the SaveWindow.

At your WCF Silverlight examples, you send the XML to the server, where the content is rendered into the selected File (e.g. PDF, docx, etc.) and send the byte-array back to the Client.
When I look at your non-WCF Silverlight examples, you have the Report-Files embedded into the Silverlight project and from there you can make a quite normal SaveFileDialog, as expected.

If it is not possible to make the WCF Samples to act like we expected, can we combine the two Projects? Report-File on the Server is sent to the client and the Document-Save actions are done on the client not on the server, we don't want to embedd the Report-Files on the client!
If we understand you correctly, then you can export 2 ways:
1. Over server. The report is sent to server. There it is exported completely. And the report is sent back to client as byte massive which will be saved on disk. In this case SaveWindow is necessary.
2. Export can be done by Silverlight without server but not all exports supported completely. And in this case no window will appear.

To switch on/off button of this export, please use this properties:
Stimulsoft.Report.StiOptions.Viewer.Elements.ShowReportSaveButton
StiOptions.Viewer.Elements.ShowReportSaveToServerButton

dstoermer wrote:To your second reply perhaps my question has been misunderstood, too!

We use good fitting images for the reports (e.g. DIN A4), but the SIlverlight zoom-function in the viewer works very good for the text, but not for the images, later on the report the images are good, but while you are in the preview mode, the don't scale automatically like the normal text.
We reproduced this issue and will fix it to next prerelease.

Thank you.
dstoermer
Posts: 14
Joined: Tue Sep 20, 2011 12:34 am

WCFService.WCFExportDocument - SaveFileDialog and Autoscale of Images

Post by dstoermer »

Hi Aleksey,
thank you very much for your quick reply!

I will have a look at your mentioned steps, perhaps our reports fit in the gap that we don't need the SaveWindow! I will let you know!

Thank you very much, that you fix the image-scale-issue in the next minor-release!

I wish you a nice week-end!

Kind regards
Daniel
dstoermer
Posts: 14
Joined: Tue Sep 20, 2011 12:34 am

WCFService.WCFExportDocument - SaveFileDialog and Autoscale of Images

Post by dstoermer »

Good Morning Aleksey,
I had a look at your mentioned steps, and for now it looks very good, that we only use the supported Files, so that we don't need the SaveWindow-Dialog!
Thank you very much for your help!

I wish you a good start into the new week!

Kind regards
Daniel
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

WCFService.WCFExportDocument - SaveFileDialog and Autoscale of Images

Post by HighAley »

Hello, Daniel.
dstoermer wrote: I had a look at your mentioned steps, and for now it looks very good, that we only use the supported Files, so that we don't need the SaveWindow-Dialog!
Thank you very much for your help!

I wish you a good start into the new week!
Thank you for the good words!

If you don't need SaveWindow-Dialog, you can disable it. WCF examples are with source code. You can make any changes in it.

Thank you.
Locked