Focal Point
[SOLVED]Sum values per account

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8277081816

March 23, 2012, 10:04 AM
RandomGuy234
[SOLVED]Sum values per account
I'm still a bit of a newbie when it comes to WebFOCUS.

I've looked about here in these forums, and I can't seem to find an answer to my question. This is what I currently have.

NAME PERIOD AMT_BILLED AMT2
-----------------------------------
AAA 201101 100 25
AAA 201102 100 50
AAA 201103 100 25

BBB 201101 50 10
BBB 201102 50 20
BBB 201103 50 20

I need to sum the AMT2 field based on what periods a user selects. So if the user were to select 201101 and 201102 for periods this is the output that would be expected:

NAME AMT_BILLED AMT2
-----------------------------------
AAA 100 75

BBB 50 30

I've found the REPEAT command which seems like it my do what I want it to, but I can't seem to get it to work. When ever I run it adds the AMT2 from each of the records in the output instead of a group of one account at a time.

Any insight would be greatly appreciated, and if there is any other information I can give you to help you help me I shall do my best to provide said information.

This message has been edited. Last edited by: RandomGuy234,


WF Version: 7611
OS: Windows XP
Output: Excel, PDF, HTML
March 23, 2012, 11:59 AM
GamP
1. create master file describing data
2. link master and data (for instance access file for sql, filedef for plain text)
3. create report, something like:
table file master
sum amt2
by name
by amt_billed
end
The repeat command is for Dialog manager, which is not very useful for creating reports.
And, a basic course on how to do reports in WebFocus would also be very helpful.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 23, 2012, 12:24 PM
RandomGuy234
Cools, so a BY field is not summed. That partially solves my problem. I need the AMT_BILLED field to display elsewhere in the report and it needs to show it's value every time.

Also, I'd like to mention that this is a big monstrosity of a report that I've taken over, so I'm a little leery of hacking away at it too much. I do have some sort of basic understanding of WebFOCUS, although I may be missing a few things here and there.


WF Version: 7611
OS: Windows XP
Output: Excel, PDF, HTML