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.

15. PROGRAMMING A REPORT15.1 OverviewThis chapter presents the processes that can be run in a report and in its elements (controls and blocks) aswell as their operating mode and sequence.Several WLanguage functions and properties can be used in these processes. Some functions and propertiesspecific to reports are presented in this chapter.See the online help (keyword: "Processes of a report") for more details.15.2 Sequence of processes associated with a reportSeveral operations are performed when a report is printed. These operations are performed in the followingorder:1. Run the "Opening" process of the report2. Run the "Initialization" process of the blocks and the "Initialization" process of the controls3. Initialize the data source4. For reports based on a data file, a view or a memory zone:• Run the "Filter" process of the report• Run the procedures for sorting the report5. Initialize the margins and define the Portrait/Landscape mode6. Resize the report (if necessary) according to the specified format7. Print the Start of document block and run its processes *8. Print the Page header block and run its processes for each page of the report *9. Print Loop:•Read the record• Run the "Filter" process of the report (for the reports based on a query or on a table). If not OK,goes to the next record.• Perform calculations on the values of the items• Run the "Read" process of the report• Test of the break:- on the break item for the automatic breaks,- on the value returned by the "Break" process for the programmed breaks.• If OK, change break and print one or more Break Header and Break Footer blocks.•Print the Body blockNote: When printing a Break Header, Break Footer or Body block, the following operations are performed:• Run the "Pre-print" process of the block and the "Pre-print" process of the block controls• Perform calculations on the block controls• Resize the auto-sizable controls and blocks• Print the block and run the "Post-print" process of the block10 Print the End of document block and run its processes *11. Print the Page footer block and run its processes for each report page *12. Run the "Closing" process of the reportPart 1: Report editor 135

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

Saved successfully!

Ooh no, something went wrong!