SQR --- Structured Query Reporting tool.
SQR Program is divided into 3 parts.
1. Header Section -- Report Title/Report Time/Report Name etc fit into this section.
2. Body Section -- Main Program logic goes into this section.
3. Trailer Section -- Page Number etc will go in this section.
Remember Line 1 of Header section is different from Line 1 of Body section. That means each section of the program has its own memory area.
Lets see how to write program with these sections.
BEGIN-HEADER
END-HEADER
BEGIN-PROGRAM
END-PROGRAM
BEGIN-FOOTER
END-FOOTER
Example:
Reference of below program is from peoplebooks.
begin-program
print 'Hello, World.' (1,1)
end-program
begin-heading 1
print 'Tutorial Report' (1) center
end-heading
begin-footing 1
! print "Page n of m" in the footing
page-number (1,1) 'Page '
last-page () ' of '
end-footing
begin-heading 1 means Header requires 1 line of space for printing Title.
No comments:
Post a Comment