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

How to execute commands in Print Preview

$
0
0

This example demonstrates how to execute printing system commands in a report's preview. This may be necessary, for example, to emulate a particular action performed when an end-user clicks on a particular toolbar button, or chooses a particular menu item. To do this, assign a report to a ReportPrintTool instance, and use the PrintingSystemBase.ExecCommand method of the PrintTool.PrintingSystem.

The code below illustrates how to change the zoom value of a report's preview, so that it fits the entire page (via the ViewWholePage command), and how to invoke and hide the Hand tool which is used to scroll the report's pages. Note that in this instance some commands are called without any parameters, while others require parameters to be passed via the overloaded version of the ExecCommand method.

See also:
How to change visibility of toolbar buttons and menu items in print preview
How to: Execute and Modify Commands in a Print Preview


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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