Skip to content

Latest commit

 

History

History
48 lines (42 loc) · 1.88 KB

File metadata and controls

48 lines (42 loc) · 1.88 KB
title Change PageSettings from the client side (HTML5 Report Viewer)
description How to change report's PageSettings from the client side (HTML5 Report Viewer)
type how-to
page_title Change PageSettings from the client side (HTML5 Report Viewer)
slug change-page-settings-from-the-client-side
position
tags
ticketid 1348293
res_type kb

Environment

Product Version 12.2 18.1017
Product Progress® Telerik® Reporting

Description

How would I dynamically change report properties / settings from the report viewer client side?

Solution

Report settings can be modified from the client side through report parameters. In case the value of some report property is bound to a report parameter value, changing the value of report parameter from the client side would change the value of the report property. For example, to bind Report.PageSettings.Landscape property to a report parameter, add a binding into Report.Bindings collection. An example binding rule in the Edit Bindings dialog:

Property path: PageSettings.Landscape
Expression: = Parameters.Landscape.Value

All visible (Visible=true) report parameters can be changed from the client side using parameters area of the report viewer. Report parameter can also be hidden (will not appear in the viewer's parameters area) and you can pass the value to this parameter using reportSource.parameters collection of the viewer:

$("#reportViewer1")
	.telerik_ReportViewer({                  
		serviceUrl: "/api/reports",
		reportSource: {                      
			report: "SampleReport.trdp",
			parameters: { Landscape: true }
		},
...