Page 1 of 1

StiDesigner.SavingReport Questions

Posted: Thu Oct 09, 2008 5:13 pm
by johnham
I added an event handler to StiDesigner.SavingReport. Everything seems to work ok with my custom saving dialog, but I noticed that when I try to exit without saving I still get a prompt that asks if I want to Save. If I press yes, my box comes up and I save but then it comes up again. I was wondering if I was doing something wrong and this spawn a couple questions.

StiSavingObjectEventArgs.SaveAs is true when someone clicks "Save As" but what if someone has never saved a report and it still has a default name and presses "Save" or if they try to close without saving and are prompted to save and press yes. Will StiSavingObjectEventArgs.SaveAs be true in these situations or do I need to keep track of when they have done their first Save As... and then do "Save As" if they try to push "Save" before having actually named their report.

My second question involves "StiSavingObjectEventArgs.Processed". Am I supposed to set this to true if I Save Successfully or what is it for?

Thanks,
John Hamilton
POSitive Software Company
http://www.gopositive.com

StiDesigner.SavingReport Questions

Posted: Mon Oct 13, 2008 10:09 am
by Vital
Hello John,
I added an event handler to StiDesigner.SavingReport. Everything seems to work ok with my custom saving dialog, but I noticed that when I try to exit without saving I still get a prompt that asks if I want to Save. If I press yes, my box comes up and I save but then it comes up again. I was wondering if I was doing something wrong and this spawn a couple questions.
Can you show code which you are use?
StiSavingObjectEventArgs.SaveAs is true when someone clicks "Save As" but what if someone has never saved a report and it still has a default name and presses "Save" or if they try to close without saving and are prompted to save and press yes. Will StiSavingObjectEventArgs.SaveAs be true in these situations or do I need to keep track of when they have done their first Save As... and then do "Save As" if they try to push "Save" before having actually named their report.
If you call save method at first time report designer mark this action as SaveAs = true.
My second question involves "StiSavingObjectEventArgs.Processed". Am I supposed to set this to true if I Save Successfully or what is it for?
If you assign this property to true in your event handlers then you successfully processed save event. If false then report designer will be save report.

Thank you.