Skip to main content

Print Preview Mouse Events

  • 2 minutes to read

You can provide various interactive capabilities to your report shown in Print Preview without writing any code (in particular, create a drill-down report, implement interactive sorting and/or enable content editing).

If these interactive features do not suit your requirements, you can perform actions on a report document directly in Print Preview using special mouse events. Such events allow you to detect activities involving a report’s elements and obtain the elements’ content.

When publishing a document, each report control is transformed into a graphical primitive (brick) corresponding to the control’s type. A brick renders a control’s content and defines its size and location on a document’s page. Each Print Preview mouse event provides access to the target brick and allows you to manipulate it (for instance, re-organize the report based on the obtained data or transmit this data to another application window).

The mouse events that are raised in Print Preview in response to user actions vary depending on your application’s target platform.

Windows Forms

In Windows Forms applications, you can perform various operations on a report document in Print Preview using the following events available at the control level:

Most report controls (except for the XRPivotGrid, XRSubreport, XRPageBreak and XRCrossBandControl) support these events.

WPF

In WPF applications, you can add interactivity to your reports using the Document Preview‘s events:

ASP.NET

Use the following client-side events to provide interactivity to web reports:

Tip

See the following documents to learn how to use the described mouse events to get a control’s value when clicking it in Print Preview and implement the drill-through functionality: