ReportViewer Parameters Area disabled

2 posts, 0 answers
  1. Francisco
    Francisco  avatar
    5 posts
    Member since:
    Jul 2016

    Posted 19 Sep Link to this post

    Telerik version SP1.11.1.17.614

     
    function createSingleSelectEditor(placeholder, options) {
            console.log(placeholder);
                var dropDownElement = $(placeholder).html('<div></div>');
                var parameter,
                      valueChangedCallback = options.parameterChanged,
                      dropDownList;
     
                function onChange() {
                    var val = dropDownList.value();
                    valueChangedCallback(parameter, val);
                }
     
                return {
                    beginEdit: function (param) {
     
                        parameter = param;
     
                        $(dropDownElement).kendoDropDownList({
                            dataTextField: "name",
                            dataValueField: "value",
                            value: parameter.value,
                            dataSource: parameter.availableValues,
                            change: onChange
                        });
     
                        dropDownList = $(dropDownElement).data("kendoDropDownList");
                    }
                };
            }
     

    @(Html.TelerikReporting().ReportViewer()
                .Id("VisorInformes")
                .ServiceUrl(Url.Content("api/reports/"))
                .TemplateUrl("/Resources/Templates/telerikReportViewerTemplate-FA.html")
                .ReportSource(typeReportSource)
                   .ViewMode(ViewMode.Interactive)
                .ScaleMode(ScaleMode.Specific)
                .Scale(1.0)
                .PersistSession(false)
                .PrintMode(PrintMode.AutoSelect)
                .ParameterEditors(p =>
                p.SingleSelectEditor("createSingleSelectEditor"))
  2. Neli
    Admin
    Neli avatar
    147 posts

    Posted 23 Sep Link to this post

    Hello Francisco,

    It seems that the style of the report viewer's template is broken. I used the provided code in a sample application. However, everything worked as expected.

    I suggest inspecting the page through the dev tools of the browser. Check if the style of any of the elements overrides the style of the report parameters area or if there are any errors. 

    For more information on how to use dropdown instead of a list, refer to How To: Create a Custom Parameter Editor article.

    Regards,
    Neli
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top