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

HTML5 Report viewer not accepting parameters

2 Answers 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Donald
Top achievements
Rank 1
Donald asked on 14 Apr 2014, 03:39 PM
When I create a report viewer, I pass in the parameters, but the report still uses the default parameters. Also when I expand a group to show details it resets back to the default parameters. I am using customer parameters.


    $(function () {


        $("#reportViewer1")
            .telerik_ReportViewer({
                serviceUrl: "/api/TelerikReports/",
                templateUrl: '/Content/Telerik/Report/telerikReportViewerTemplate.html',
                reportSource: {
                    report: "SomeReportType",
                    parameters: {
                        StartDate: $('#StartDate').data("kendoDatePicker").value(),
                        EndDate: $('#EndDate').data("kendoDatePicker").value(),
                        DC: $('#Dcs').data("kendoComboBox").value()
                    }
                }
            });
    })


        function ShowReport() {

            var viewer = $("#reportViewer1").data("telerik_ReportViewer");

            
            viewer.reportSource({
                report: viewer.reportSource().report,
                parameters: {
                    StartDate: $('#StartDate').data("kendoDatePicker").value(),
                    EndDate: $('#EndDate').data("kendoDatePicker").value(),
                    DC: $('#Dcs').data("kendoComboBox").value()
                }
            });
            viewer.refreshReport();
        }



2 Answers, 1 is accepted

Sort by
0
Donald
Top achievements
Rank 1
answered on 14 Apr 2014, 07:11 PM
Update: It also doesn't seem to work using the built in parameter editors.
0
Donald
Top achievements
Rank 1
answered on 14 Apr 2014, 09:53 PM
OK I figured this out, needed to update to the latest version of Newtonsoft.json aka json.net

This fixed another issue, when expanding groups it would show the report with the default parameters.
Tags
General Discussions
Asked by
Donald
Top achievements
Rank 1
Answers by
Donald
Top achievements
Rank 1
Share this question
or