Add Report Parameter that can control number of records in a list

2 Answers 8 Views
Report Parameters
Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
Mark asked on 29 May 2025, 10:43 AM

We want to add a ReportParameter that is visible to the user (We know how to make them visible, we do that with boolean type parameters so the users can hide or show items on reports), that is INTEGER based that will control the number of records are showing in a "LIST" control on our report.   For example, we have a detailed Report with USER information; then in the report, we have a list that displays the USER's access over time. This could be one record or as many as a thousand records.  We would like is this parameter to control the number of records shown in that list control.

Now, I have been able to create the INTEGER Report Parameter and make it visible; however, what I have not figured out is the following:

  1. How do you make the control for the parameter a spin editor, if possible?
  2. How do you limit the parameter's value (Low/High)?
  3. How do you apply that parameter's value to the number of records displayed in the "LIST" control?

 

TIA

2 Answers, 1 is accepted

Sort by
0
Krasimir
Top achievements
Rank 3
Iron
Iron
Iron
answered on 29 May 2025, 11:33 AM

Hello Mark,

You have few options for controlling the visualization of the parameters. That depends mainly on their type. I'm afraid, there is no built-in way to show a spin editor. Also, parameters are shown before the entire report is rendered. Therefore, it's extremely hard to get information about the total number of records that fill in the list.

A common approach I've seen is to use something that resembles the pagination for tables. You could set a list of predefined options in the filter like 1, 5, 10, 20, 50, 100 and let the user choose among them. Then, you could update the data source that feeds the list to show the first N records based on the parameter selection.

I've attached a very simple prototype of this approach. Keep in mind that the filtering is quite dummy, but it could be further improved depending on the data source you are using. The SQL data source may not be working on your side, but you could explore it as a reference on how to use parameters in SQL sources. 

If you are using an SQL data source, I would suggest that you use the parameter value in the SQL definition like here:

Would that help?

Regards,
Krasimir Baylov

Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
commented on 29 May 2025, 11:37 AM

I was afraid of this. The approach you have given above will not work for our needs. We don't make any actual calls from our report layouts to get the data source; the data source is passed into our reports; this is just the design of our system. We will have to find a different way to meet our customers' requirements.

 

Thank you.

0
Todor
Telerik team
answered on 03 Jun 2025, 09:01 AM

Hello Mark,

You may consider implementing Custom Parameter Editors outside the Report Viewer's area. The approach for the HTML5 Report Viewer is explained in the article Passing Values to Report Parameters from Components Outside the HTML5 Report Viewer.

Regards,
Todor
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Report Parameters
Asked by
Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
Answers by
Krasimir
Top achievements
Rank 3
Iron
Iron
Iron
Todor
Telerik team
Share this question
or