51

Speed up Filtering with the Latest Editor Types in Telerik Report Viewers

 5 years ago
source link: https://www.tuicool.com/articles/hit/EF7zUri
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Learn about a new feature in Telerik Reporting that lets you change the default parameters editors types for visible parameters in the HTML5 Viewer's Parameters Area.

TheTelerik Reportingteam works hard to satisfy your needs and wishes. With every release we are trying to improve our products and to offer you helpful new additions. In our latest release, the Telerik HTML5 Report Viewer provides an option for changing the parameter editors type. All newly added editors are  Kendo UI widgets since the HTML5 Report Viewer is built on top of the Kendo UI product.

Defining the Parameters

The UI editor can be changed for parameters both accepting single or multiple values. The parameter needs to have predefined AvailableValues in its report definitions. To specify that the parameter should accept multiple values turn on the MultiValue property.

BBbUze3.png!web

Defining the Editors Type

Both parameters have two optionaleditor types – ListView and ComboBox. The listview is the default editor type. To use it there are no additional settings to be configured. As for the other editor type, a simple setting must be applied to the HTML5 Report Viewer:

First, this feature requires the latest official release. So please consider updating toR2 2019+.

Second, after we are all on the same page, for your convenience here is an example for all HTML5 Report Viewer wrappers:

HTML5 jQuery Report Viewer

$("#reportViewer1").telerik_ReportViewer({
 …
parameters: {
 editors: {
 singleSelect: telerikReportViewer.ParameterEditorTypes.COMBO_BOX,
 multiSelect: telerikReportViewer.ParameterEditorTypes.COMBO_BOX
 }
  }
});

HTML5 ASP.NET MVC Report Viewer

@(Html.TelerikReporting().ReportViewer()
 …
.Parameters(new Parameters {
 Editors = new Editors {
  SingleSelect = EditorTypes.ComboBox,
       MultiSelect = EditorTypes.ComboBox
 }
})
)

HTML5 ASP.NET Web Forms Report Viewer

<telerik:ReportViewer  EnableAccessibility="false" ID="reportViewer1" runat="server">

    …

  <Parameters>

   <Editors SingleSelect="ComboBox" MultiSelect="ComboBox"></Editors>

  </Parameters>

</telerik:ReportViewer>

HTML5 Angular Report Viewer

<tr-viewer #viewer1="" [parameters]="{
  editors: {
   singleSelect: 'COMBO_BOX',
   multiSelect: 'COMBO_BOX',
  }
}"></tr-viewer>

As you can see, it is not rocket science, but it does give you a lot of user usability. The editor types as a Kendo UI widget supports built-in filtering, saves quite a bit of space in the Parameters area and allows users to quickly select the right value even if there are a hundred choices. Try it now and let us know how it works for you!

Try it Out and Share Feedback

We want to know what you think—you can download a free trial ofTelerik Reportingor  Telerik Report Server today and share your thoughts in our Feedback Portal, or right in the comments below.

Start your trial today:Reporting Trial Report Server Trial

Tried DevCraft?

You can get Reporting and Report Server with Telerik DevCraft. Make sure you’ve downloadeda trialor learn more about DevCraftbundles. DevCraft gives you access to all our toolsets, allowing you to say “no” to ugly apps for the desktop, web or mobile.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK