View previous topic :: View next topic
|
Author |
Message |
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Hi All,
I am trying to create a report in easytrieve. When the field, which is being totaled, is non zero the report displays the value but when the field is zero the report is printing spaces. I asked one person and he said thats how it works. Is it true, if so is there anyway I can force the program to write zero.
Code: |
REPORT OUTPUT1 PRINTER OUTFILE SUMMARY SPREAD
SEQUENCE VAR1 VAR2 VAR3
CONTROL VAR1 NOPRINT VAR3 NOPRINT VAR2
SUM AMOUNT
TITLE 1 WS-REPORT-TITLE
HEADING 'VAR1' VAR1
HEADING 'VAR3' VAR3
HEADING 'VAR2' VAR2
HEADING 'AMOUNT' AMOUNT
LINE VAR1 VAR3 VAR2 AMOUNT
|
The amount variable is declared as 12 8 N 0
Please let me know, if additional informations are required. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Have a look at MASK and find out from your manual what the default MASK is. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I asked one person and he said thats how it works. |
Consider asking someone else in the future . . .
While that answer is not Wrong, it is not helpful either.
Refer to Bill's note. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
One of the most pointless defaults of all time.
With value of zero:
Code: |
8 N => 00000000
8 N 0 =>
(that part intentionally left blank) |
saurabh39,
Unless the cunningly-named VAR1, VAR2 and VAR3 have any decimal places (including 0) you don't need the SUM, it will happen automatically.
I never knew you could specify the HEADING like that, I've always put the name first, like in the manual. In fact, usually had them on the data-definitions, either in macros for "copybooks" (so the same field always gets the same heading in any REPORT) or for "storage" fields. Learn something new every day... |
|
Back to top |
|
|
|