I am using Stimulsoft since 2011.
I have come up with two question.
The first one:
Is there any option for Undo and Redo function in StiWebViewer.
I tried both : StiWebDesignerOptions.Viewer.Toolbar
StiWebViewerFxOptions.Toolbar.
But no luck.
The second question:
I can use Save As in Designer which is saved in local.
The issue is, I allow the clients to create Report and view/edit/save through StiWebViewer. When they create report, the report is saved in WebHosting (under App_Data folder).
The code:
Code: Select all
protected void ReportDesigner_SaveReport(object sender, StiWebDesigner.StiSaveReportEventArgs e)
{
var reportId = Page.Request["ID"];
int id = int.Parse(reportId);
using (var db = new TMS_DAL.DataContext())
{
var report = db.Reports.Single(x => x.Id == id);
try
{
var path = string.Format("{0}\\{1}.mrt", Server.MapPath("~/App_Data/Reports"), report.Name);
e.Report.Save(path);
template.LastModified = DateTime.Now;
db.ExecuteCommand("update table_Reports set LastModified = '" + report.LastModified.Value.ToString("yyyy-MM-dd hh:mm:ss") + "' where reportId = " + report.Id + ";");
}
catch (Exception ex)
{
// TODO - can we log this to user?
}
}
}
Thank you for help in advance.
Regards,
Win