View:
Code: Select all
@Html.Stimulsoft().StiMvcMobileDesigner(
"StimulsoftDesigner1",
new StiMvcMobileDesignerOptions
{
ActionGetReportTemplate = "GetReportTemplate",
ActionGetReportSnapshot = "GetReportSnapshot",
ActionSaveReportTemplate = "SaveReportTemplate"
})
Code: Select all
public ActionResult GetReportTemplate()
{
StiReport report = new StiReport();
DataTable dt = (DataTable)Session["ReportSource"];
report.RegData(dt);
return StiMvcMobileDesigner.GetReportTemplateResult(HttpContext, report);
}
public ActionResult GetReportSnapshot()
{
StiReport report = StiMvcMobileDesigner.GetReportObject(HttpContext);
// Register data, if necessary
DataTable dt = (DataTable)Session["ReportSource"];
report.RegData(dt);
// Return the report snapshot result to the client
return StiMvcMobileDesigner.GetReportSnapshotResult(HttpContext, report);
}
public ActionResult SaveReportTemplate()
{
StiReport report = StiMvcMobileDesigner.GetReportObject(HttpContext);
report.Save(@"D:\" + report.ReportName + ".mrt");
return StiMvcMobileDesigner.SaveReportTemplateResult(HttpContext);
}