View previous topic :: View next topic
|
Author |
Message |
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Hi All,
First of all, thank you very much for all your kind help.
I need to print the total number of records and the total of payment field at the end of report in easytrieve.
File Layout:
Code: |
FILE INFLE FB(45 0)
IN-REC 01 45 A
IN-KEY 01 10 N
IN-PAYMENT 26 12 N 2
|
Report Definition:
Code: |
REPORT REPORT1 LINESIZE 132 PRINTER RPTDD01 SUMCTL ALL
CONTROL IN-PAYMENT
TITLE 01 'TITLE - 1'
TITLE 02 'TITLE - 2'
LINE 01 IN-KEY +
IN-PAYMENT
|
Sample Input Data:
Code: |
----+----1----+----2----+----3----+----4----+
0012345678 001234567899
0045612300 091234567899
0010089078 711234567899
|
Sample Output:
Code: |
TITLE - 1
TITLE - 2
IN-KEY IN-PAYMENT
0012345678 0012345678.99
0045612300 0912345678.99
0010089078 7112345678.99
3 8037037036.97
|
Tried with different options using SUMMARY, TALLY, etc... But I could not get the desired output.
Can anyone help me in this regard.
Please help.
Thanks,
Sati |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Try using SUMMARY for the report definition. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
It is unusual to specify an amount as a control-field. If you want final totals, youl need CONTROL FINAL as well.
Do you have a manual? If not, get one. This is about the 2nd simplest report you'll ever see, so you've really got to crack it on your own, and it is all in the manual.
If your manual is delayed, look at other Easytrieve Plus programs at your site. I'm not going to say ask a co-worker. You need to do this yourself, from the manual and what sample code you can find. If someone "gives" on all of this, you'll have lost a good learning opportunity which you need when starting out with it. |
|
Back to top |
|
|
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Thanks a lot Dick and Bill for your pointers.
I have learnt new things on report concept in easytrieve.
I got my output using below report definition.
Code: |
REPORT REPORT1 LINESIZE 132 PRINTER RPTDD01 SUMMARY SUMCTL DTLCOPY DTLCTL EVERY
SEQUENCE IN-KEY
CONTROL FINAL NOPRINT IN-KEY
|
Thanks again.
Thanks,
Sati |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Glad to hear it. Thanks for letting us know. |
|
Back to top |
|
|
|