e.SaveAs is true all the time...

Stimulsoft Reports.NET discussion
Post Reply
David
Posts: 2
Joined: Mon Mar 26, 2007 6:17 pm

e.SaveAs is true all the time...

Post by David »

Dear Sirs
I would like to ask U if I`m doing anything wrong, because I have some problems with SR behavior. I`m using version 2007.03.21 of SR. I wrote my own method for save and I have that problem... When the save event is fired... no matter if it is from "Save" or "SaveAs"... parameter StiSavingObjectEventArgs e.SaveAs is set on true all the time. What am I doing wrong? I thought that e.SaveAs is set to true only in case when it is fired from SaveAs action in designer. Is it bad idea or I`m something missing?
Thank you 4 your help

David

example of using...

private void StiDesigner_SavingReport(object sender, StiSavingObjectEventArgs e)
{
if ((this.stiReport.IsModified) || (e.SaveAs)) // and in this case e.SaveAs is true all tha time...

// TO DO Anything

}
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

e.SaveAs is true all the time...

Post by Edward »

Thank you for the information.

We will inform you in this topic when the solution will be ready.
DG
Posts: 5
Joined: Fri Aug 04, 2006 2:03 am

e.SaveAs is true all the time...

Post by DG »

Had the same problem. After saving, set the ReportNeverSaved property of the Designer to false;

Code: Select all

report.Designer.ReportNeverSaved = false;
David
Posts: 2
Joined: Mon Mar 26, 2007 6:17 pm

e.SaveAs is true all the time...

Post by David »

DG wrote:Had the same problem. After saving, set the ReportNeverSaved property of the Designer to false;

Code: Select all

report.Designer.ReportNeverSaved = false;
But I need decide before saving if I should insert row into the database or update it... I`m affraid set up this property after save will not help...
DG
Posts: 5
Joined: Fri Aug 04, 2006 2:03 am

e.SaveAs is true all the time...

Post by DG »

That's what it will do.

Code: Select all

if(e.SaveAs)
{
     //Insert new row
    report.Designer.ReportNeverSaved = false; //The next time, e.SaveAs will be false
}
else
{
    //Update row
}
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

e.SaveAs is true all the time...

Post by Vital »

We have added special option for this case:

Code: Select all

StiOptions.Designer.IgnoreOptionReportNewerSaved
This property equal false by default. If you set this property to true then property ReportNeverSaved will be ignored in any cases.

Update will be available in final release of version 2007.1 (today).

Thank you.
Post Reply