StiDesigner.SavingReport Questions

Stimulsoft Reports.NET discussion
Post Reply
johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

StiDesigner.SavingReport Questions

Post 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
Thanks,
John Hamilton
Hamilton & Company, LLC
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

StiDesigner.SavingReport Questions

Post 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.
Post Reply