Page 1 of 1

e.SaveAs is true all the time...

Posted: Mon Mar 26, 2007 6:49 pm
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

}

e.SaveAs is true all the time...

Posted: Tue Mar 27, 2007 5:57 am
by Edward
Thank you for the information.

We will inform you in this topic when the solution will be ready.

e.SaveAs is true all the time...

Posted: Wed Mar 28, 2007 2:24 am
by DG
Had the same problem. After saving, set the ReportNeverSaved property of the Designer to false;

Code: Select all

report.Designer.ReportNeverSaved = false;

e.SaveAs is true all the time...

Posted: Wed Mar 28, 2007 3:12 am
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...

e.SaveAs is true all the time...

Posted: Thu Mar 29, 2007 2:54 am
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
}

e.SaveAs is true all the time...

Posted: Thu Mar 29, 2007 3:28 am
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.