Focal Point
[CLOSED] Need numeric field to not add up in a FML hierarchy

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

January 14, 2010, 03:33 PM
Fernando
[CLOSED] Need numeric field to not add up in a FML hierarchy
I have an FML report that uses SUM with 3 numeric columns. Columns 1, 2 adds up among the hierarchy as required.

Column 3 is adding up as well, but we don't want to add up. We want a blank at the parent levels.

We have tried converting it to an alpha. It doesn't add up but shows the max.

How would I do this?

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


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
January 14, 2010, 03:43 PM
Waz
Can you supply example code and output ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 14, 2010, 04:59 PM
rfbowley
The simplest technique I have ever used to accomplish something like this is to create a stylesheet entry for that one field and set COLOR attribute equal to the BACKCOLOR attribute, The value is still there, but it appears like a blank space.


Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
January 14, 2010, 05:52 PM
Fernando
Example Heirarchy:
  
Name    Parent Hier Weight
Top     .      1    null
Parent1 1      2    null
Parent2 1      3    null
Ch1P1   2      4    null
Ch2P1   2      5    null
Ch3P2   3      6    null
Ch4Ch1  5      7    5
Ch5Ch1  6      8    10

Data    hier  Value
Bot 1   7      14
Bot 2   7       2
Bot 3   8      18

JOIN CLEAR *
JOIN
 CH IN HIER TO MULTIPLE CH IN MYDATA AS J1
END
TABLE FILE HIER
SUM
 Value
 Weight
FOR CH
'1' WITH CHILDREN ALL ADD AS CAPTION LABEL R1
END 


report would show

Name Value Weight
Top 34 15
Parent1 16 5
Ch2P1 16 5
Ch4Ch1 16 5
Parent2 18 10
Ch3P2 18 10
Ch5Ch1 18 10

I want

Name Value Weight
Top 34 15
Parent1 16 .
Ch2P1 16 .
Ch4Ch1 16 5
Parent2 18
Ch3P2 18 .
Ch5Ch1 18 10


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
January 15, 2010, 08:46 AM
Fernando
I like the idea of the colors but the hierarchy can be changed at any time by the users (except the top) so I cannot hard code to any numbers.


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
January 15, 2010, 10:13 AM
Hua
If the rest is working with color idea, then all you need is to add another line for the top line:
'1' ADD ALL LABEL R1
'1' GET CHILDREN ALL ADD AS CAPTION LABEL R2
  



Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
January 15, 2010, 12:29 PM
Fernando
How does stop me from having to hard coding hierarchy numbers when I create the condition for the colors? The values below the top are the ones that can change and therefore I can not hard code values.


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
January 15, 2010, 02:25 PM
Hua
I don't know it will work, but try RECAP the 2nd line like this:
recap
column1 = column1;
column2 = column2;
column3 = if ch is last child then column3 else 0;


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
January 19, 2010, 09:05 AM
Doug
quote:
set COLOR attribute equal to the BACKCOLOR attribute, The value is still there, but it appears like a blank space.
CAUTION: The use of setting the COLOR to the BACKCOLOR is that IT IS VISIBLE if / when the user selects the associated text. So, when "hiding" sensitive information this IS NOT the way to go...
Your information may not be sensitive and this may be a bit off topic. But, Please consider this when applicable...




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206