Save a file opened in the designer

Stimulsoft Reports.WEB discussion
Post Reply
Jorys
Posts: 5
Joined: Fri Sep 06, 2013 12:39 pm

Save a file opened in the designer

Post by Jorys »

Hello,

In a Web application built whith the ASP.NET technology, I have put a link to open an empty report designer.
Here, the user can open a file, edit it, but the save button do not work.

I know that it is possible to edit the OnSaveReport event and save it in a specific file.
But here, I want to save the same file which is opened by the user.
Can you tell me what can I do to make the save button work ?


Thanks for your help.
Regards
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Save a file opened in the designer

Post by Alex K. »

Hello,

You need to somehow identify the report on the server side. To do this, in the report saving event OnSaveReport you can use the properties of a report report.ReportName or report.ReportGuid, as well as report.ReportFile.

Thank you.
Jorys
Posts: 5
Joined: Fri Sep 06, 2013 12:39 pm

Re: Save a file opened in the designer

Post by Jorys »

Thanks for your reply.

The problem is that I do not know which file is opened.
The designer report component is opened without file loaded. The user must use the open file button.

So, when he saves his modifications, on the server side, we do not know the filename and its path.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Save a file opened in the designer

Post by Vladimir »

Hello,

Please specify if we have not understood it correctly:
You want to open the report file in the WebDesigner from the local computer (using the Open menu) and when you save the report on the server side somehow determine which one report is opened?

Thank you.
Jorys
Posts: 5
Joined: Fri Sep 06, 2013 12:39 pm

Re: Save a file opened in the designer

Post by Jorys »

Yes that is right.

In the report saving event OnSaveReport, I pass the StiWebDesigner.StiSaveReportEventArgs parameter but there is no file information.

Have you any idea ?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Save a file opened in the designer

Post by Vladimir »

Hello,

Please check the following property in the OnSaveReport event:
e.Report.ReportFile

Its value will be the same as the name of the file that is open in the designer using the Open menu.

Thank you.
Jorys
Posts: 5
Joined: Fri Sep 06, 2013 12:39 pm

Re: Save a file opened in the designer

Post by Jorys »

Hello,

I have already checked this property. Its value is an empty string.


Thank you for the time you spent to help me.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Save a file opened in the designer

Post by Vladimir »

Hello,

We have reproduced the error. We will try to fix it for a new release 2013.2

Thank you.
Jorys
Posts: 5
Joined: Fri Sep 06, 2013 12:39 pm

Re: Save a file opened in the designer

Post by Jorys »

Hello,

First, I want to thank you for your help and all your replies.
I have seen that the new release 2013.2 is available.


I have used it and I have tried to do my process again :
- In the code, I only load an empty Web Designer ( StiWebDesigner.Design(new StiReport()); ),
- With the browser, I go on the Asp.Net Web application. The Web Report Designer is well loaded.
- I use the menu to open a new report file (Open Report...)
- After modified it, I click on the Save Report button in the menu toolbar
- A "Saving Report" popup with a progress bar appears but nothing happen.

The same problem occurs : the file cannot be saved.


Can you tell me if I have forgotten to do something.

Thank you,
Jorys
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Save a file opened in the designer

Post by Vladimir »

Hello,

Please show us the code of the OnSaveReport event of the Web report designer. And check whether it is called correctly?

We could not reproduce the error on the new 2013.2 version. The attached archive contains our test project.
LoadSaveDemo.zip
(296.88 KiB) Downloaded 242 times
Thank you.
Post Reply