Squelette Sqr Report
Posted on Friday 25 January 2008, 14:15 - Peoplesoft - Permalink Tweet
- Article
- |
- Comments(0)
- |
- Attachments(2)
SQR est un langage assez fastidieux à déboger, et l'on se laisse
souvent prendre aux petits pièges comme par exemple, la nécessité d'indenter
les ordres sql pour qu'ils fonctionnent...
Voici donc un squelette de programme sqr. J'espère que comme pour moi, il
vous évitera d'obtenir des erreurs avant même d'avoir commencé à programmer
:).
Vous trouverez joint à ce post, le fameux fichier WORDFILE.TXT permettant la coloration syntaxique de SQR dans l'éditeur UltraEdit.
#INCLUDE 'SETENV.SQC'
BEGIN-SETUP
#INCLUDE 'SETUP01.SQC'
END-SETUP
!-------------------------------------------
!
Begin-Heading
! Standard
Section ran on each pages
!-------------------------------------------
BEGIN-HEADING 6
print 'header' ()
END-HEADING
!-------------------------------------------
!
Begin-Footing
! Standard
Section ran on each pages
!-------------------------------------------
BEGIN-FOOTING 4
last-page () ' /' ' '
! "Page 12 of 25.
END-FOOTING
!-------------------------------------------
! Begin
Report
! Main section
of program execution (standard for Reports).
!-------------------------------------------
BEGIN-REPORT
!
We have to manualy manage the line position
let #line = 1
let #col = 1
let $mytext1 = 'test1'
let $mytext2 = 'test2'
!
Print my text1
print $mytext1 (#line, #col)
!
We have to manualy manage the line position
ADD 1 TO #line
ADD 10 TO #col
!
Print my text2
print $mytext2 (#line, #col)
ADD 1 TO #line
do MY-REPORT
END-REPORT
!-------------------------------------------
! Your Custom
Procedure
! Put here the
main part of your Report
!-------------------------------------------
BEGIN-PROCEDURE MY-REPORT
print 'page1' (#line, #col)
!
Create new page
new-page
MOVE 1 TO #line
MOVE 1 TO #col
print 'page2' (#line, #col)
END-PROCEDURE !MY-REPORT