Please do post your comments and suggestions for me to improve on chowdary1105@gmail.com

Wednesday, July 22, 2009

Multiple Report Generation in SQR

For generating multiple reports in sqr , Use different "Declare-Report" and use the different report name in various procedures Given an example code:- Here we get two reports

begin-setup
!#define MAX_LABEL_LINES 10
!#define LINES_BETWEEN_LABELS 3begin-setup
declare-layout labels
paper-size&H3D(10,11) left-margin&H3D0.33
end-declare
declare-layout form_letter
end-declare
declare-layout listing
end-declare
declare-report labels
layout&H3Dlabels
end-declare
declare-report form_letter
layout&H3Dform_letter
end-declare
declare-report listing
layout&H3Dlisting
end-declare
end-setup

begin-program
do aa
do bb
end-program

begin-procedure aa
begin-select
emplid (,1)
position (+1)
from psoprdefn
end-select
use-report form_letter --> First report
end-procedure

begin-procedure bb
print 'hello' (1,1)
use-report listing --> Second Report
end-procedure

You can use diferent layouts if you want as given above.

No comments: