I am using the following code to dynamically set the report source for the HTML5 / MVC viewer. Unfortunately although I can change the current report using the dropdownlist - when the report loads the parameter area stays disabled, do I cannot modify the report parameters from their defaults. Seems to be a CSS issue - how can I fix?
Regards
Ian
@model CLOCS.Models.ReportsViewModel
@{
ViewBag.Title = "Reporting";
}
<
h2
>Reports</
h2
>
@*<
div
class
=
"form-group"
>*@
@Html.LabelFor(model => model.SelectedReportName, htmlAttributes: new { @class = "control-label col-md-2" })
<
div
class
=
"col-md-10"
>
@Html.Kendo().DropDownListFor(m => m.SelectedReportName).Name("reportDropDown").BindTo(Model.ReportClassNamesList).OptionLabel("Select Report")
@Html.ValidationMessageFor(model => model.SelectedReportName, "", new { @class = "text-danger" })
</
div
>
@*</
div
>*@
@section styles
{
<
link
href
=
"ReportViewer/styles/ReportViewer-8.0.14.225.css"
rel
=
"stylesheet"
/>
<
link
href
=
"/kendo/styles/kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"/kendo/styles/kendo.blueopal.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"
rel
=
"stylesheet"
>
<
style
>
#reportViewer1 {
position: absolute;
left: 5px;
right: 5px;
top: 180px;
bottom: 5px;
overflow: hidden;
}
</
style
>
}
@section scripts
{
<
script
>
$(document).ready(function () {
$("#reportDropDown").change(function () {
var value = $(this).val();
if (value && value != "") {
var viewer = $("#reportViewer1").data("telerik_ReportViewer");
viewer.reportSource({
report: "CLOCS.Reporting." + value + ", CLOCS.Reporting"
}
);
viewer.refreshReport();
}
});
});
</
script
>
<
script
src
=
"ReportViewer/js/ReportViewer-8.0.14.225.js"
></
script
>
}
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.ServiceUrl("/api/telerikreports/")
.TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.html")
.ReportSource(new TypeReportSource() { TypeName = "CLOCS.Reporting." + Model.SelectedReportName + ", CLOCS.Reporting" })
.ViewMode(ViewModes.INTERACTIVE)
.ScaleMode(ScaleModes.SPECIFIC)
.Scale(1.0)
.PersistSession(false)
)