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

ReportViewer Parameters Area disabled

1 Answer 208 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Francisco
Top achievements
Rank 1
Francisco asked on 19 Sep 2019, 04:01 PM
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"))

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 23 Sep 2019, 01:48 PM

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
Tags
General Discussions
Asked by
Francisco
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or