I am working on a report in which the data I am reporting against contains parent/child relationships. Each child is tied to its parent through a numerical code. Each child also has its own numerical code. I am trying to achieve a report that will show sales information for all of the children of a particular parent. I have set up a decode similar to below:
COMPUTE Child/A20 = DECODE Parent (111111 'GROUPNAME1' 222222 'GROUPNAME2' 33333 'Groupname3');
AS 'Child Group'
The problem I am encountering is that each parent may have several children, so there is a separate entry for each child of a parent. Is there a way to summarize all of the children of a parent to create one entry per parent code, while totaling and displaying the sales figures for the entire group? For example
Child Group Total Sales
GroupName3 $10, 000
Have you tried using a define for the child group rather than a compute? Then sum by the group.
DEFINE FILE XYZ
CHILD/A20 = DECODE.....
TABLE FILE XYZ
SUM SALES BY CHILD
This type of report is handled in the
Developer Studio option in Report Painter called
the FML (financila modeling language) where lots
of parent/child relations occur (account parent to child accounts in GL) .
See the Documentation on how to use this feature.
Thank you both for the advice! I'll be working on it this morning.
|Powered by Social Strata|