Page 1 of 1

Get additional information before saving.

Posted: Mon Aug 10, 2009 5:49 pm
by mvines
I need to get some additional information for my system about a report being saved before streaming the .mrt file to disk. Stuff like name (separate from the file name), description, security settings, and some other miscellaneous stuff our client wants to maintain. To gather this information I need to present a form to the user in the SaveReport event handler of the report designer.

My issue is that I can't seem to get any sort of popup or pseudo popup to work. My original idea was to use a hidden div dressed up like a window that is hidden until SaveReport is fired. At which time I show the form, and actually persist the report on it's save button event. However, this 'window' never shows up. I can't seem to get it on top of the designer. I do this sort of pseudo window in a few other places in the app, so I am pretty sure I don't have an issue in its implementation.

Is this something that is possible with the web designer? Which SaveMode do I need to use? Why? (As I find the save modes confusing, and haven't found much in the documentation about it.)

Thanks for your time.

Get additional information before saving.

Posted: Tue Aug 11, 2009 1:56 pm
by mvines
Maybe being a little more concrete with my question would be useful.

Let's say I have the following aspx page defined.

Code: Select all


    
            
    
    
        
        
        
    
    
With the designer being fed a report and displayed in form load, and a SaveReport event handler like the following

Code: Select all

protected void StiWebDesigner1_SaveReport(object sender, StiWebDesigner.StiSaveReportEventArgs e)
{
    _stiReportToSave = e.Report;
    StiWebDesigner.Visible = false;
    SavePanel.Visible = true;

}
And the Save event for my panel being handled with the following.

Code: Select all

protected void SaveReportButton_Click(object sender, EventArgs e)
{
    // Instantiate my Report business object.
    ReportBE report = new ReportBE();
    // Set properties of the business object based on the information entered by the user
    report.ReportName = ReportNameTextBox.Text;
    // ...etc. etc.
    // Save the Report business object to the database.
    report.Save();

    // Save the sti report template to the file system.
    string saveReportPath = ConfigurationManager.AppSettings["SavedReportsPath"];
    _stiReportToSave.Save(string.Format("{0}{1}", saveReportPath, report.ReportName));    
}
My issue at this time is in StiWebDesigner1_SaveReport. I can't seem to hide the report, nor show the SavePanel that I have created. This is a simplified version of the code I have. I have also tried a few derivations of this code to no avail. What I need is to either hide web designer, or place my own form on top of it. I would even be happy with closing the web designer if that is possible.

Get additional information before saving.

Posted: Thu Aug 13, 2009 4:16 am
by Andrew
Hello,

We have improved the web designer code for solving your problem . The patch will be available on 17-Aug-2009.
Also we will prepare a sample for solving your task.

Thank you.

Get additional information before saving.

Posted: Fri Aug 14, 2009 4:06 pm
by mvines
This is excellent news, thank you and keep up the good work.

Get additional information before saving.

Posted: Tue Aug 18, 2009 2:25 am
by Vladimir
Hello,

Please download the build from 17-Aug-2009.
The example is in the attached file.

Thank you.

Get additional information before saving.

Posted: Wed Aug 19, 2009 2:22 pm
by mvines
First, thanks for making this available to me.

Do you have a time line for the next release of the web designer? I am restricted from using tools and libraries in my application that are not stable release versions. If I could show my boss that your release date should come with enough time for us to integrate and test it before our release date I have a much better chance of getting to code against and leave some feedback for the preview release now.

Get additional information before saving.

Posted: Thu Aug 20, 2009 8:40 am
by Vladimir
Hello,

The official release will be available at 7 September, 2009.

Thank you.