show dialog box when saving the report

Stimulsoft Reports.WEB discussion
Post Reply
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

show dialog box when saving the report

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

show dialog box when saving the report

Post 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.
User avatar
Drew
Posts: 7
Joined: Wed Jul 11, 2012 6:24 am

Re: show dialog box when saving the report

Post by Drew »

is there also a way to do this on MVC?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: show dialog box when saving the report

Post 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.
User avatar
Drew
Posts: 7
Joined: Wed Jul 11, 2012 6:24 am

Re: show dialog box when saving the report

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

Re: show dialog box when saving the report

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