When use SavingReportinDesigner event saves the old version of the report.
Posted: Thu Sep 03, 2009 3:00 am
Hello.
Our application allow users modify their report form in designer and save it as a binary object in a database field.
How it implement write there and there.
Our code to save report
But when you click in designer save button to database saves the old version of the report, only when you twice click save button saved the modified report. Is there a way to avoid double-clicking save button?
Used
Microsoft Visual Studio 2005
Language C++/CLI
StimulsoftReportsNet2009.1 and StimulsoftReportsNet2008.2
Our application allow users modify their report form in designer and save it as a binary object in a database field.
How it implement write there and there.
Our code to save report
Code: Select all
Stimulsoft::Report::StiOptions::Engine::GlobalEvents::SavingReportInDesigner += gcnew Stimulsoft::Report::Design::StiSavingObjectEventHandler(this, &FrmReport::SavingReportInDesigner);
private: void SavingReportInDesigner(Object ^ sender, Stimulsoft::Report::Design::StiSavingObjectEventArgs ^ e)
{
Stimulsoft::Report::Design::StiDesignerControl ^ designerControl = (Stimulsoft::Report::Design::StiDesignerControl ^)sender;
System::IO::MemoryStream ^ reportStream = gcnew System::IO::MemoryStream();
designerControl->Report->Save(reportStream);
SaveReportToDataBase(reportStream);
}
Used
Microsoft Visual Studio 2005
Language C++/CLI
StimulsoftReportsNet2009.1 and StimulsoftReportsNet2008.2