I have a form and want to pass the form parameter to the report controller method to filter the data which will passed to the StiReport. How can I do that?
Code: Select all
@using NursingHomeStock.Resources
@{
Layout = "~/Views/Shared/_Layout.cshtml";
ViewBag.Title = GlobalResources.Reports;
}
<div class="well">
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="from" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label">@GlobalResources.From</label>
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-10">
@(Html.Kendo().DateTimePicker()
.Name("from")
.Value(DateTime.Now)
)
</div>
</div>
<div class="form-group">
<label for="to" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label">@GlobalResources.To</label>
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-10">
@(Html.Kendo().DateTimePicker()
.Name("to")
.Value(DateTime.Now)
)
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="button" class="btn btn-default" onclick="PASS-FORM-PARAMETER-TO-CONTROLLER-ACTION-AND-RENDER-REPORT">Bericht erstellen</button>
</div>
</div>
</form>
</div>
@Html.Stimulsoft().StiMvcViewer("NursingHomeReportViewer", new StiMvcViewerOptions
{
// Theme = StiTheme.Windows7,
ActionGetReportSnapshot = "NursingHomeReport",
Localization = "~/Content/Localization/de.xml",
ActionViewerEvent = "ViewerEvent",
ActionExportReport = "ExportReport",
ActionInteraction = "Interaction",
ActionPrintReport = "PrintReport",
Width = Unit.Percentage(100),
MenuZoom = 150
})
Marko