ActionInteraction
Posted: Thu Jan 23, 2014 6:58 pm
I've defined a mobileviewer as follows with the actions in the controller below. The GetReportSnapshot action is firing and the report is loading. However, when clicking the 'Next' and 'Previous' buttons nothing is happening. What am I missing?
Code: Select all
<table>
<tr>
<td>@Html.Stimulsoft().StiMvcMobileViewer(new StiMvcMobileViewerOptions()
{
ActionGetReportSnapshot = "GetReportSnapshot",
ActionViewerEvent = "ViewerEvent",
ActionPrintReport = "PrintReport",
ActionExportReport = "ExportReport",
ActionInteraction = "Interaction"
})</td>
</tr>
</table>
Code: Select all
public ActionResult ViewerEvent()
{
return StiMvcMobileViewer.ViewerEventResult(this.HttpContext);
}
public ActionResult PrintReport()
{
return StiMvcMobileViewer.PrintReportResult(this.HttpContext);
}
public ActionResult Interaction()
{
return StiMvcMobileViewer.InteractionResult(this.HttpContext);
}
public ActionResult Export()
{
return StiMvcMobileViewer.ExportReportResult(this.HttpContext);
}
public ActionResult GetReportSnapshot(ReportModel r)
{
PivotDrillDownDataSource dataObject = Session["stimulsoftdata"] as PivotDrillDownDataSource;
if (dataObject == null) return null;
StiReport report = Utils.LoadReport("~/Content/Reports/TransByItemClass.mrt");
var dt = Convert.ToDateTime(dataObject[0]["Month"]);
Stimulsoft.Report.DateTimeRange dtr = new Stimulsoft.Report.DateTimeRange(dt, dt.AddMonths(1));
report.Dictionary.Variables.Add("Dates", dtr);
report.Dictionary.DataSources["TransByItemClass"].Parameters["pItemClass"].Value = string.Format("\"{0}\"", dataObject[0]["ItemClass"]);
report.Dictionary.DataSources["TransByItemClass"].Parameters["pSiteID"].Value = string.Format("\"{0}\"", dataObject[0]["SiteID"]);
// Restore the route values collection and get the id value
RouteValueDictionary routeValues = StiMvcMobileViewer.GetRouteValues(this.HttpContext);
return StiMvcMobileViewer.GetReportSnapshotResult(HttpContext, report);
}