Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to print/export only those records that are checked via the XRCheckBox in the reports' detail band in a Web application

$
0
0

This example demonstrates how to conditionally include rows into a printed/exported web report. To select rows, the XRCheckBox is used. Once the user clicks on the corresponding XRCheckBox, the client script is executed (it is defined via the XRCheckBox.NavigateUrl property within the XRCheckBox.BeforePrint event handler), and a callback is sent to the server to update the internal storage (in the Session variable) of the skipped rows and regenerate a report in the ReportViewer accordingly.

Note that by inspecting the Page.Request["__EVENTARGUMENT"] parameter, you can determine whether the print/export command is initiated via the ReportToolbar button. If so, you should handle the XRControl.BeforePrint event for the DetailBand and XRCheckBox, and set the e.Cancel parameter to true based on your logic to skip unnecessary report content elements.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>