This is a migrated thread and some comments may be shown as answers.

MVC / HTML 5 Report Viewer parameter area disabled

3 Answers 141 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 1
Ian asked on 08 May 2014, 09:08 PM
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)
)

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 10 May 2014, 04:42 PM
Hello Ian,

Please, upgrade to the latest available Telerik Reporting Q1 2014 SP1 version 8.0.14.507, where the issue is fixed - Upgrading Telerik Reporting Projects.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Thom
Top achievements
Rank 1
answered on 28 May 2014, 08:33 PM
I am having the same issue.  I am using the html 5 viewer and I updated my version to Telerik Reporting Q1 2014 SP1 version 8.0.14.507.  The parameter section is all disabled (the parameters I want to allow the user to change are all Booleans).  When updating, I simply got the new version then ran the wizard.  The report works fine in the visual studio designer preview.  Can I configure the parameter layout to match the layout in the designer (with the parameters on the top instead of the side)?
0
Stef
Telerik team
answered on 29 May 2014, 08:09 AM
Hello Thom,

The issue reported by  Ian is fixed in Telerik Reporting Q1 2014 SP1 version 8.0.14.507. Please follow the instructions for manual upgrade of Web application to update your projects.

About re-arranging the HTML5 Report Viewer's template. Basically, the viewer is entirely HTML5/CCS3/JS based widget, which needs the ReportViewer-x.x.x.x.js(css) and telerikReportViewerTemplate.html template files to work. You can freely modify the templates to move the integrated parameters area above the page area.

You can also use external UI and pass parameters values as described in the How To: Pass values to report parameters help article.

If the issue with the viewer's parameters area remains after the upgrade, we will appreciate it if you open a support ticket and send us a runnable demo project that reproduces the problem.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Ian
Top achievements
Rank 1
Answers by
Stef
Telerik team
Thom
Top achievements
Rank 1
Share this question
or