Skip to content

Added new kb article dynamic-page-size-telerik-reporting #1745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions knowledge-base/dynamic-page-size-telerik-reporting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Dynamically Setting Page Size Based on Report Parameter
description: Learn how to dynamically set PageSettings.PageSize in Telerik Reporting using a binding expression based on a report parameter.
type: how-to
page_title: How to Dynamically Adjust Page Size Based on Report Parameter in Telerik Reporting
meta_title: Dynamically Adjust Page Size in Telerik Reporting Using Report Parameter
slug: dynamic-page-size-telerik-reporting
tags: telerik, reporting, pagesettings, binding, parameters
res_type: kb
ticketid: 1693152
---

## Environment

<table>
<tbody>
<tr>
<td>Product</td>
<td>Reporting</td>
</tr>
</tbody>
</table>

## Description

I need to dynamically adjust the page size of a Telerik report based on a report parameter. I want to use a binding expression for `PageSettings.PageSize` without relying on an external function. I am looking for a solution where the page size can be dynamically controlled using expressions.

## Solution

To adjust the page size dynamically based on the report parameter, use a binding expression that passes the parameter value as a string. Follow these steps:

1. Ensure the report parameter, such as `sizeParameter`, is of type String.
1. Set up the binding expression for the `PageSettings.PageSize` property using the parameter value.

![Dynamic Page Size](images/DynamicPageSize.png)

Or you can use an expression like below, but the parameter should be a String:

`= Parameters.sizeParameter.Value`

When this expression is used, the `PageSettings.PageSize` property will dynamically adjust based on the parameter values provided by the user.

## See Also

* [Using Expressions in Binding]({%slug telerikreporting/designing-reports/connecting-to-data/expressions/using-expressions/bindings%})
* [Report Parameters Overview]({%slug telerikreporting/designing-reports/connecting-to-data/report-parameters/overview%})
Binary file added knowledge-base/images/DynamicPageSize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.