Focal Point
[CLOSED] ROW TOTAL IS FIRST FIELD

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

May 30, 2011, 05:34 AM
Deepu
[CLOSED] ROW TOTAL IS FIRST FIELD
 

Hi 

can any one hlep me

i want to displya row total data in first Field

TABLE FILE RPT
SUM CNT.FIELD
BY AVERAGE
ACROSS FIELD AS ''
ON TABLE ROW-TOTAL AS 'Total_DATA'
END

I WANT TO DISPLAY TOTALS IN FIRST FIELD LIKE THIS


        Total_DATA  DATA1   DATA2     
AVERAGE
 2            3       0       3 
 3            22      4       18     
 4            42      0       42      
 5            29      3       26      
 

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


WebFOCUS 7.6
Windows, All Outputs
May 30, 2011, 06:27 AM
GamP
Maybe with a multi set request, like:
TABLE FILE RPT
SUM CNT.FIELD
BY AVERAGE

SUM CNT.FIELD
BY AVERAGE
ACROSS FIELD AS ''
ON TABLE ROW-TOTAL AS 'Total'
END



GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
May 30, 2011, 08:34 AM
FrankDutch
The solution Gamp give you is almost what you need, but the ROW-TOTAL should not be added.

the ROW-TOTAL will give you the wrong result as you may notice.
It calculates the sum of ALL columns including the firts one that already is the SUM.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

May 30, 2011, 09:31 AM
<FreSte>
Or (there it is again), combine it with FPRINT

TABLE FILE CAR
  SUM COMPUTE TOTCAR/A9 = FPRINT(CNT.CAR, 'I9', 'A9');
    BY COUNTRY

  SUM CNT.CAR
    BY COUNTRY 
    BY CAR
  ACROSS SEATS AS ''
  ON TABLE ROW-TOTAL AS 'Total'
  ON TABLE SET STYLE *
  TYPE=DATA, COLUMN=TOTCAR, JUSTIFY=RIGHT ,$
END

May 30, 2011, 10:14 AM
<JG>
Actually there appears to be a little bug in the FPRINT function.

It is supposed to right justify the output, so the styling should not be needed, except for the column title.
However it only does the automatic justification with PDF output.
June 07, 2011, 06:00 PM
Doug
I know this was closed, but, consider : "SEQUENCE"