|
View previous topic :: View next topic
|
| Author |
Message |
svsarath
New User
Joined: 30 May 2006 Posts: 16
|
|
|
|
Please help me.
| Code: |
DT TYPE NET PAID ID
20090309 B 1.00 15
20090309 B 2.00 25
20090309 B 2.00 25
20090309 B 3.00 30
20090309 B 5.00 35
20090309 B 5.00 35
20090309 C 5.00 35
11.00
REPORT REPORT1 LINESIZE 50 SPACE 1 PRINTER REPFORM1
CONTROL
LINE 1 DT TYPE NET-PAID +
ID TALLY |
Here the NET PAID amount is same for a similar ID
but I need the total NET PAID for all different ID's. In the above example
the total NET PAID should be 11.00, but by using the above Report
statement I am getting total as 23.00. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
| Quote: |
but by using the above Report
statement I am getting total as 23.00 |
Yes, because 23.00 is the correct answer. If the value is in the report, it will be totaled. Why would you want items on the report to not be totaled? |
|
| Back to top |
|
 |
svsarath
New User
Joined: 30 May 2006 Posts: 16
|
|
|
|
Dear d.sch,
Actually I need to display those duplicate records also, but there is another field(FIELD1) which is unique for each and every record. Becauseeventhough the value is in the report, it shouldn't be totaled.
Please see the below test data.
| Code: |
DT TYPE NET PAID ID FIELD1
20090309 B 1.00 15 1
20090309 B 2.00 25 2
20090309 B 2.00 25 3
20090309 B 3.00 30 4
20090309 B 5.00 35 5
20090309 B 5.00 35 6
20090309 C 5.00 35 7
11.00
REPORT REPORT1 LINESIZE 50 SPACE 1 PRINTER REPFORM1
CONTROL
LINE 1 DT TYPE NET-PAID +
ID FIELD1 TALLY |
I hope I am clear.
Thanks
Sarath |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
You might add a new column (WS-SUM-PAID) to the report and move zeros to the duplicate entries. Then only the first amount would be summed for each "key". |
|
| Back to top |
|
 |
svsarath
New User
Joined: 30 May 2006 Posts: 16
|
|
|
|
Thanks for help..
Thanks
Sarath |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome
Your reply does mean that is it now working, correct?
d |
|
| Back to top |
|
 |
|
|