Focal Point
[SOLVED] Row total for one column

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

April 28, 2006, 01:14 PM
Kamesh
[SOLVED] Row total for one column
Hi,
I'm trying to get the Row total for only one column not for the all columns in verb request.

The sample code is below,
TABLE FILE CAR
SUM DEALER_COST
RETAIL_COST
BY CAR
ACROSS COUNTRY
ON TABLE ROW-TOTAL
END
-EXIT

If you see the Total, you will see both dealer and retail cost. I want to see the row total only for Dealer_Cost.

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


WFConsultant

WF 8105M on Win7/Tomcat
April 28, 2006, 01:42 PM
j.gross
Use RECAP after ACROSS to add a summary column on the right. Try this (untested):
TABLE FILE CAR
SUM DEALER_COST NOPRINT
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
RECAP DC_TOTAL=C1;
END
April 28, 2006, 01:43 PM
Spence
Try this.

TABLE FILE CAR
SUM DEALER_COST AS 'Tot Dealer'
BY CAR
SUM DEALER_COST
RETAIL_COST
BY CAR
ACROSS COUNTRY
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
April 28, 2006, 01:46 PM
Prarie
Hopefully there is a better way...but I got around this recently by creating a compute field with what I wanted.
COMPUTE TOT/D9MB = DEPT1+DEPT2 ; AS TOTAL
Then just printing it at the end.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
add the BY CAR after the first verb in j.g. solution and it works fine.

TABLE FILE CAR
SUM DEALER_COST NOPRINT
BY CAR
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
RECAP DC_TOTAL=C1;
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
Hi JG and Spence,
Yes, this code works but I want the label to say as Total, Dealer, Cost.


Example:
TABLE FILE CAR
SUM DEALER_COST NOPRINT
BY CAR
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
RECAP DC_TOTAL=C1; AS 'Total, Dealer, Cost'
END

The problem is, it is displaying Total Dealer Cost in one line. The comma is not working as how it works in Title(start in next line).


WFConsultant

WF 8105M on Win7/Tomcat
I just ran the code in our windows 5.3.4 and the title for the DC_TOTAL came out as three lines. Moment here, it is not removing the comma is what you're saying? I ran without the commas to HTML out and it wrapped the header but then that may be due to html.


Leah
quote:
DC_TOTAL

try this.

TABLE FILE CAR
SUM DEALER_COST NOPRINT
BY CAR
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
RECAP 'Total Dealer Cost'=C1;
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
Hi Spence,
This code works. Thanks


WFConsultant

WF 8105M on Win7/Tomcat
Hi,

I used this solution because I didn't need a row total for all my across columns.

Worked great so thank you!

Now the problem...

At first, all the RECAPs were printing 2 decimals even if the original columns were not formatted that way. Then, I had to change the format of some of the columns so the $ would print. Now, my RECAP totals are size 10 font instead of size 8 like the rest of my columns (only the data, the titles are fine).

I've tried referring to them by Cn and by the field name. No dice. Any ideas?

Thanks,

Krysti


WF 767
Nevermind. I got it to work.

I added a format to the RECAPs and it picked up the size 8 font. No idea why, but it did!


WF 767