custom save as report

Stimulsoft Reports.WEB discussion
Post Reply
sthe
Posts: 5
Joined: Tue Apr 26, 2011 1:22 am

custom save as report

Post 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?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

custom save as report

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

sthe
Posts: 5
Joined: Tue Apr 26, 2011 1:22 am

custom save as report

Post 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?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

custom save as report

Post by Vladimir »

Hello,

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