From 7f9b32b75718fd462f218a86c6c55bcd85fea84c Mon Sep 17 00:00:00 2001 From: KB Bot Date: Sat, 19 Jul 2025 14:49:56 +0000 Subject: [PATCH 1/4] Added new kb article dynamic-page-size-telerik-reporting --- .../dynamic-page-size-telerik-reporting.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 knowledge-base/dynamic-page-size-telerik-reporting.md diff --git a/knowledge-base/dynamic-page-size-telerik-reporting.md b/knowledge-base/dynamic-page-size-telerik-reporting.md new file mode 100644 index 000000000..d483af40f --- /dev/null +++ b/knowledge-base/dynamic-page-size-telerik-reporting.md @@ -0,0 +1,58 @@ +--- +title: Dynamically Setting Page Size Based on Report Parameter in Telerik Reporting +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 + + + + + + + + + + + + +
ProductReporting
Version14.2.20.1021
+ +## 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, such as a .NET library with custom functions. I am looking for a solution where the page size can be dynamically controlled using expressions. + +This knowledge base article also answers the following questions: +- How to bind page size to a report parameter in Telerik Reporting? +- How to set page size dynamically in Telerik Reporting without external functions? +- How to use report parameters to control page dimensions? + +## 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 and contains the page size value in the format `"width,height"` (e.g., `"8.5in,11in"` for letter size). + +2. Set up the binding expression for the `PageSettings.PageSize` property using the parameter value. + +Example binding expression: +```text += Parameters.sizeParameter.Value +``` + +3. Ensure the report parameter is properly configured with valid values corresponding to the expected page dimensions. + +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](https://docs.telerik.com/reporting/designing-reports/connecting-to-data/expressions/using-expressions/bindings) +- [Report Parameters Overview](https://docs.telerik.com/reporting/designing-reports/parameters/overview) +- [Telerik Reporting PageSettings API](https://docs.telerik.com/reporting/api/telerik.reporting.pagesettings) From 85b282f3fe3d5a09236faa63589f4afebb3576db Mon Sep 17 00:00:00 2001 From: IvetNikolova <118352332+IvetNikolova@users.noreply.github.com> Date: Sat, 19 Jul 2025 17:51:11 +0300 Subject: [PATCH 2/4] Add files via upload --- knowledge-base/images/DynamicPageSize.png | Bin 0 -> 6805 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 knowledge-base/images/DynamicPageSize.png diff --git a/knowledge-base/images/DynamicPageSize.png b/knowledge-base/images/DynamicPageSize.png new file mode 100644 index 0000000000000000000000000000000000000000..e185512c6a477a2030b2f24e694d95d6d5cb33df GIT binary patch literal 6805 zcmbVR2UHV#vk#)6q7+e4kpOZpDyRWPdO(_ps8|s20s)kwbR~!(5Kv0!p(sV^pdtZ6 z4UmuoE?qi^l#tMykbtxmLdeVYetz$L@4WAwcix_}XLe_2{_~re-<&=B-|*YF3=i%< zu^$8i9W=V8e-{Me1wbI4qP@Ia&BRr{1rTW0*6kan2AP?e%gf6g4rg_BmCa_`+uL&u zh=j`C-rkIi3?h+8CX-1dk{X7JcLae{FiM)2nX*-AQ0l> z;;0-Bp2Mkd0CA`oM?9yzyu27!2y!7)F=~~Sl^{nv2;^8*RfWgnK@Jte+<5F^HIQ1& zFq=yK%eA1O;N81-IXO9PZEdPtZG}TwSy=^}T~Sd{T3X5tAEOF#0DB=a9D^$|qRcdAYv69t5&&X=wo|qi1Jl zIqgclJxzqFPn?cNw%Fy#$;r{t(ejdn*x1x~PoOX}- z`T4-WK#T*%-`{_v!in8+mkWo*VlmcPz2giHr`^@v^Fx5CGDuk{@GGaC?DH0zmX`j5 znp%KOE%+4bGpi?t2U4~k1~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D743a&;e#*V>y>gYUrnc4NT5q=lNc^wD1fp4bQNHvPdgj3+^(tbw+L z+-Yx=+@$4sZ%#V%WdH-F+ZBDkCfNw+Lp>Z`q+=ivAsT7P8Iq` z=A_~^>ZG3dfYQ%o|CnIicq`e4Gj$g`{;B5f$k2Kq`!s zDWrC#qaDWEG7o-HunC(P^Q2L|NenF?rz1&XrGwn$>zVIshc`*2qEQ%t@(UQ1Vih9Q zJgtT1wtaU7CGR3P&U@pBNYM8_5tjQjNlP$PR4gxzmo`d~6c6Cgp>8Ee&Sv1b%9mo1 zEGEtJs1H+tt@(3VhpRD@gH23=j~o6gNz$h2#`JgNLgXdFNNqxr=nOKjYqk%11^8KF z0{;~t@Gf`%YnAf63wX>MU=~7$eEjMUSwpFjS>|vdO)0gM%$V60s_V_$#LL_czV26? zLREdV0qSWXBSJoHsH!V^)0+rYZTg!#9pCyAoa!|Ft0TBnBXPSm>qPW!8CDPu<@wR+ z;G*9uIcF>E6U?_u^qqyNy}bGlDbL`l2(ROBBKMZ#qu-{a=A|9)4-w>BFAHLaw!-dS zH_a+MyGA!0p*6R)CTY-EQM`dhrGeG2xFWdC{RlrOAy_0qge$H!eo1TOsXh6aeRrkS1?jsYaZ?Elq2)PVEBuW!^PxcmAS=g@ z(*J#ngwEj>MN9s9ynL1B;%^MSXgPrRiA6eBG2O;;qI|!Xi0N8?@`Z|xIPGzXG-K2E zeLH9lH{^X~Guxt2;O(|pZu7R!b?kcfu`VZl;*SbK=IONlnx>o0wJN&m9*;FU UKc39}n*=g4xTRmDYy0Xy070&SyZ`_I literal 0 HcmV?d00001 From 209db7a89ff30c91594cf08bc6c264fbf26d4924 Mon Sep 17 00:00:00 2001 From: IvetNikolova <118352332+IvetNikolova@users.noreply.github.com> Date: Sat, 19 Jul 2025 18:03:56 +0300 Subject: [PATCH 3/4] Update dynamic-page-size-telerik-reporting.md --- .../dynamic-page-size-telerik-reporting.md | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/knowledge-base/dynamic-page-size-telerik-reporting.md b/knowledge-base/dynamic-page-size-telerik-reporting.md index d483af40f..98d482f46 100644 --- a/knowledge-base/dynamic-page-size-telerik-reporting.md +++ b/knowledge-base/dynamic-page-size-telerik-reporting.md @@ -1,5 +1,5 @@ --- -title: Dynamically Setting Page Size Based on Report Parameter in Telerik Reporting +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 @@ -13,46 +13,41 @@ ticketid: 1693152 ## Environment - - - - - - - - - - + + + + + + + + + +
ProductReporting
Version14.2.20.1021
ProductReporting
Version14.2.20.1021
## 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, such as a .NET library with custom functions. I am looking for a solution where the page size can be dynamically controlled using expressions. - -This knowledge base article also answers the following questions: -- How to bind page size to a report parameter in Telerik Reporting? -- How to set page size dynamically in Telerik Reporting without external functions? -- How to use report parameters to control page dimensions? +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 and contains the page size value in the format `"width,height"` (e.g., `"8.5in,11in"` for letter size). +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. -2. 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: -Example binding expression: ```text = Parameters.sizeParameter.Value ``` -3. Ensure the report parameter is properly configured with valid values corresponding to the expected page dimensions. - 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](https://docs.telerik.com/reporting/designing-reports/connecting-to-data/expressions/using-expressions/bindings) -- [Report Parameters Overview](https://docs.telerik.com/reporting/designing-reports/parameters/overview) -- [Telerik Reporting PageSettings API](https://docs.telerik.com/reporting/api/telerik.reporting.pagesettings) +* [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%}) From 084fd3d70da50f16d8697b8fc494100e3fa53c1f Mon Sep 17 00:00:00 2001 From: Todor Arabadzhiev Date: Tue, 22 Jul 2025 13:24:10 +0300 Subject: [PATCH 4/4] Update dynamic-page-size-telerik-reporting.md --- .../dynamic-page-size-telerik-reporting.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/knowledge-base/dynamic-page-size-telerik-reporting.md b/knowledge-base/dynamic-page-size-telerik-reporting.md index 98d482f46..b74f0452b 100644 --- a/knowledge-base/dynamic-page-size-telerik-reporting.md +++ b/knowledge-base/dynamic-page-size-telerik-reporting.md @@ -18,10 +18,6 @@ ticketid: 1693152 Product Reporting - - Version - 14.2.20.1021 - @@ -33,17 +29,14 @@ I need to dynamically adjust the page size of a Telerik report based on a report 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. 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) + ![Dynamic Page Size](images/DynamicPageSize.png) -Or you can use an expression like below, but the parameter should be a string: +Or you can use an expression like below, but the parameter should be a String: -```text -= Parameters.sizeParameter.Value -``` +`= Parameters.sizeParameter.Value` When this expression is used, the `PageSettings.PageSize` property will dynamically adjust based on the parameter values provided by the user.