10 printing information, Project example – Lenze VisiWinNet VisiWinNET Smart Benutzerhandbuch

Seite 223

Advertising
background image

Project example

Printing information

4

l

223

SHP−VWNS DE/EN 6.1

4.10

Printing information

VisiWinNET

â

Smart contains an interface for printing information from the application.

The layout of a printout is defined during the development time by means of special printer
forms. The developer places control elements in position and thus determines the
information to be printed. During the runtime, the system fills the control elements of the
form with the corresponding values. Printout is started by means of the "PrintHandler"
component.

The following example shows how a printing function is implemented in VisiWinNET

â

Smart.

1. In Project Explorer, right−click the Design node and, in the context menu, select the

Add printer form command.
A "PrinterForm" element is created under the "Design" node and opened in the client
area.
The printer form design after printout is in the form of a sheet of paper. In the
"PageSettings" property, the paper format used (default setting: A4) can be selected.

2. From the toolbox section, place a control element of the type DateTime and one of

the type AlarmTable in position on the form.

The control elements that are available make it possible to specify the layout and the
contents of the page to be printed. In order to start printing during the runtime,
additional steps are necessary.

3. Open the FAlarm form, go to the System section of the Toolbox, and place a control

element of the type PrintHandler on the form.
After the PrintHandler control element has been placed on the form, it automatically
slides into the so−called "component slot" under the design view of the form.

Advertising