Page 1 of 1
show dialog box when saving the report
Posted: Mon Nov 14, 2011 3:17 am
by Chasoo
Hi, i wanna show dialog box to user and get report name and report type from the use before saving the report to database.is that possible with the report designer ?
tnx
chaminda
show dialog box when saving the report
Posted: Tue Nov 15, 2011 3:02 am
by Alex K.
Hello,
As a way, you can describe on the SaveReport event in designer in your code:
Code: Select all
StiOptions.Engine.GlobalEvents.SavingReportInDesigner += new StiSavingObjectEventHandler(GlobalEvents_SavingReportInDesigner);
Thank you.
Re: show dialog box when saving the report
Posted: Thu Sep 06, 2012 5:31 am
by Drew
is there also a way to do this on MVC?
Re: show dialog box when saving the report
Posted: Thu Sep 06, 2012 12:39 pm
by Vladimir
Hello,
Please try to set the following options:
Code: Select all
...
SaveReportTemplateMode = StiMvcDesignerOptions.SaveMode.Visible,
SaveReportTemplateAsMode = StiMvcDesignerOptions.SaveMode.Visible,
...
or
Code: Select all
...
SaveReportTemplateMode = StiMvcDesignerOptions.SaveMode.NewWindow,
SaveReportTemplateAsMode = StiMvcDesignerOptions.SaveMode.NewWindow,
...
In this case, report saving is carried out not in AJAX mode, and you can display your save report dialog.
Thank you.
Re: show dialog box when saving the report
Posted: Fri Sep 07, 2012 2:38 am
by Drew
i tried what you said vladimir but after i clicked save the page reloaded and displayed this:
H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/IrZ3/58AAAD//ypILTACAAAA
its the same when i use NewWindow it just opend on a new tab
Re: show dialog box when saving the report
Posted: Fri Sep 07, 2012 12:13 pm
by Vladimir
Hello,
This string is a report that is sent by the designer on the server side. You need to return the desired view in the save report action, for example:
Code: Select all
public ActionResult SaveReportTemplate()
{
StiReport report = StiMvcDesignerHelper.GetReportObject(this.Request);
return View("SaveDialog");
}
This view should contain the necessary controls, for example the report name input field and submit button.
Thank you.