13.07.2015 Views

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8.2.3 Processes associated with an edit control found in a reportThe processes associated with an edit control found in a report are as follows:ProcessInitializationPre-printEntryExitWhenever modifiedRuntime conditionRun when opening the report.Run before printing the control.Run when the input cursor enters in the control.Run when changing control (TAB key, …).Run whenever the content of the control is modified (typing or erasing a characterfor example).8.3 Input in the print preview (WinDev only)When a report is displayed in print preview, the edit controls are enabled. In this case, the user will be able toenter the requested information and print the report in one of the available formats. A message is displayedin the print preview to inform the user of the ability to enter information.By default, the user can browse the edit control by using the TAB key: it browses the available controls fromtop to bottom and left to right.Notes:• The processes associated with the edit controls are run when the controls are handled in the print preview.• The data <strong>com</strong>ing from the database can be displayed by programming. To do so, link the report to a datafile or a query, then assign the requested item to the edit control in the "Pre-print" process of the edit control.• The data modified by the user in the preview window can be saved by programming.Let’s take a simple example, the modification of a record displayed in the report. In each edit control whosevalue must be modified, you must:- assign the entered value to the item- modify the record.These actions are performed in the "Exit control" process. For example, to modify the customer name, thecorresponding code is as follows:Customer.Name = Enter_NameHModify(Customer)8.4 Input in a PDF fileWhen a report is printed in a PDF file, the edit controls are enabled. In this case, the user will be able to enterthe content of the different edit controls and to print the PDF file with the entered values.Notes:• The edit controls are used to enter information in the PDF file. This information will be used when printing.If the end user owns a full version of Adobe Acrobat, the data entered can be saved in PDF format (AcrobatReader cannot be used to save the PDF files).• The data <strong>com</strong>ing from the database can be displayed by programming. To do so, link the report to a datafile or a query, then assign the requested item to the edit control in the "Initialization" or "Before printing"process of the edit control.102Part 1: Report editor

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!