Page 1 of 1

custom save as report

Posted: Fri May 13, 2011 2:50 am
by sthe
hi,
is it possible to intercept the save as event of the web designer, ask the user for a name for the file and the save the file on the server?

custom save as report

Posted: Fri May 13, 2011 8:05 am
by Alex K.
Hello,

You can use the following code:

Code: Select all

protected void StiWebDesigner1_PreInit(object sender, Stimulsoft.Report.Web.StiWebDesigner.StiPreInitEventArgs e)
{
    StiWebDesigner1.SaveReport += new Stimulsoft.Report.Web.StiWebDesigner.StiSaveReportEventHandler(StiWebDesigner1_SaveReport);
}

void StiWebDesigner1_SaveReport(object sender, Stimulsoft.Report.Web.StiWebDesigner.StiSaveReportEventArgs e)
{
    //Your code for save report
    ...
}
Thank you.


custom save as report

Posted: Mon May 16, 2011 7:33 am
by sthe
hi,
i found the event i needed to access (StiWebDesigner1_SaveAsReport)
now when i try to save the report with report.save(), a dialog pops up that offers me to download the file,
but when i use the same command with the StiWebDesigner1_SaveReport event the report
gets saved normally on the server

what do i have to do that the SaveAsReport just saves the report to the server?

custom save as report

Posted: Tue May 17, 2011 5:10 am
by Vladimir
Hello,

Please set the SaveAsMode property of StiWebDesigner component to Hidden:
Thank you.