Report Creation Through Programming
Report Creation Through Programming
PROGRAMMING
1
REPORT GENERATION THROUGH PROGRAM
TYPE = M
ADDITIONAL.INFO = .GUI
PRODUCT = EB
2
REPORT GENERATION THROUGH PROGRAM
FORM.NAME : HOLD
MOCROFICHE.OUTPUT : N
3
REPORT GENERATION THROUGH PROGRAM
STEP 4: Run the report from the T24 command line by entering the name of the
report
Then again
REPORT.NAME EQ REPORT.ID
Press enter key and F5.
VERIFY the report.
4
EXAMPLE:
SUBROUTINE REPORT.RTN
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.CUSTOMER
GOSUB INITIALISATION
GOSUB PRINT.HEADER
GOSUB SELECT.REC
GOSUB PRINT.CLOSE
RETURN
INITIALISATION:
REPORT.ID = "REPORT.RTN"
CALL PRINTER.ON(REPORT.ID,0)
FN.CUSTOMER = 'F.CUSTOMER‘
F.CUSTOMER = ''
CALL OPF(FN.CUSTOMER,F.CUSTOMER)
5
RETURN
EXAMPLE: (cont..)
PRINT.HEADER:
SELECT.REC:
CALL F.READ(FN.CUSTOMER,Y.CUS.ID,R.CUSTOMER,F.CUSTOMER,Y.ERROR)
IF R.CUSTOMER THEN
Y.ID = Y.CUS.ID
Y.NAME = R.CUSTOMER<EB.CUS.NAME.1>
Y.STREET = R.CUSTOMER<EB.CUS.STREET>
Y.NATIONALITY = R.CUSTOMER<EB.CUS.NATIONALITY>
GOSUB PRINT.RECORD
END
REPEAT 6
RETURN
EXAMPLE: (cont..)
PRINT.RECORD:
PR.LN = FMT(Y.ID, "7L"):SPACE(2)
PR.LN:= FMT(Y.NAME, "35L"):SPACE(2)
PR.LN:= FMT(Y.STREET, "35L"):SPACE(2)
PR.LN:= FMT(Y.NATIONALITY, "5L"):SPACE(2)
PRINT PR.LN
RETURN
PRINT.CLOSE:
7
WORKSHOP
Write a program to generate a report which gives the Customer Name ,
Customer Code from the Customer Application and gives working
balance information (> 0) for that Customer from the Account
application grouping the Working Balance by Currency.
8
WORKSHOP
Generate a report which retrieves all the customer accounts with Actual
Online Balance greater than zero and displays the Account No,
Customer Code, Account Title and Open Actual Balance.
9
WORKSHOP
Generate a report to find total of working balance by currency. Display fields
are customer id, customer name, account number, currency, working balance
grouped by customer.
10