View previous topic :: View next topic
|
Author |
Message |
Ganesh N
New User
Joined: 09 May 2008 Posts: 7 Location: Kochi
|
|
|
|
Hi,
Could anyone help to solve one issue. While compuitng the Total value of one numeric field, its displaying wrongly in report , but in spool its value is correct.
eg; total calculated in pgm is 876(also displayed in spool) but in the same variable when printed in report comes as 492 only |
|
Back to top |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
Please post your EZT+ code. Do you have control breaks? How is your total field defined? We need more info. |
|
Back to top |
|
|
Ganesh N
New User
Joined: 09 May 2008 Posts: 7 Location: Kochi
|
|
|
|
This is how the field is defined as below
WS-TOT-GRAND-CTR W 7 N 0 MASK('Z,ZZZ,ZZ9')
All below mentioned WS variables have the same format.
Calculated as below
WS-TOT-TEMP-CTR = (WS-TOT-OTHER-CTR +
- (WS-TOT-BLUE-CTR + WS-TOT-CASH-CTR +
+ WS-TOT-VOID-CTR))
WS-TOT-GRAND-CTR = WS-TOT-GRAND-CTR + WS-TOT-TEMP-CTR
DISPLAY 'Grand Total' WS-TOT-GRAND-CTR
When displayed here gives the correct value, But going to Print section
gives wrong value
AFTER-BREAK. PROC.
DISPLAY SKIP 3 POS 2 'GRAND TOTAL' WS-TOT-GRAND-CTR
this is the control statement given in EZT pgm
CONTROL FINAL NOPRINT WS-BREAK1 NEWPAGE NOPRINT
Can anyone explain what each field in this control statement specifies, I think problem occurs in any of the fields specified here in control statement |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Your "duplicate" reply has been removed for you.
You probably need to post your report definition code as well as the "break" logic.
This appears to be a coding problem rather than EZT working incorrectly. |
|
Back to top |
|
|
Ganesh N
New User
Joined: 09 May 2008 Posts: 7 Location: Kochi
|
|
|
|
Hi,
This is the report logic
REPORT REPORT-01 NOADJUST NODATE SPACE(1) PRINTER(REPORT01)
SEQUENCE WS-BREAK1 RZCERT-C-CERT-NO
CONTROL FINAL NOPRINT WS-BREAK1 NEWPAGE NOPRINT
Here WS-BREAK1 is always ' ' , so goes till EOF. |
|
Back to top |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
Try defining the fields as:
WS-TOT-GRAND-CTR S 7 N 0 MASK('Z,ZZZ,ZZ9') |
|
Back to top |
|
|
Ganesh N
New User
Joined: 09 May 2008 Posts: 7 Location: Kochi
|
|
|
|
Thanks a lot lcmontanez!!!
When changed the definition as per you said, it gave the correct results at the End of Report. |
|
Back to top |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
Glad I could help. |
|
Back to top |
|
|
|