Focal Point
[CLOSED] row totals - column title missing, how to move around?

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

November 20, 2012, 10:39 AM
reportmasterlvl3
[CLOSED] row totals - column title missing, how to move around?
I have a report that has totals of the columns and also an across field on the top. When I added a row total on the far right, the column title appears blank.

1) How do I add a column title to a row total that has an across?

2) How do I move this entire column and title to the far left of my report, so the row total column is the first column of the report?

Thank you!

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


wFDS: 7.7.03, OS: Windows, Output: Mostly Excel
November 20, 2012, 10:49 AM
Doug
Would you please provide and example of this dilemma? Place your code sample within the < / > brackets from the above icons. It's probably as simple as adding row and column totals.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
November 20, 2012, 11:12 AM
reportmasterlvl3
Here it is:

TABLE FILE C_LOAN
SUM 
     CNT.C_LOAN.C_Loan.Loan_Number/I11C AS '# Loans'
     COMPUTE totalbal/D20.2CM = C_LOAN.C_Loan.Balance1 + C_LOAN.C_Loan.Balance2; AS '$ Balance'
BY  LOWEST C_LOAN.C_Loan.loantype AS 'Loan Type'
ACROSS LOWEST J0.C_Flags.bucksort NOPRINT 
ACROSS J0.C_Flags.bucket AS 'Delinquency Status'
WHERE (( C_LOAN.C_Loan.Balance1 GT 0 ) OR ( C_LOAN.C_Loan.Active_Indicator EQ 'A' ));
WHERE RECORDLIMIT EQ 1000
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
TYPE=ACROSSVALUE,
     ACROSS=1,
     BACKCOLOR='WHITE',
$
ENDSTYLE
END


I wasn't able to sort my across, so I added a defined field translating my across field, and then made that invisible.

I am able to see the title of the total column now, so I only need to move that column to the far left so it's the first column - Any thoughts?

Thanks


wFDS: 7.7.03, OS: Windows, Output: Mostly Excel
November 20, 2012, 11:31 AM
Severus.snape
One way of doing this is using multi verb request.

here is an example

  

TABLE FILE CAR
SUM RETAIL_COST AS 'Total'
BY COUNTRY
SUM RETAIL_COST
BY COUNTRY
ACROSS MODEL
ON TABLE SET PAGE-NUM NOLEAD 

ON TABLE COLUMN-TOTAL AS 'TOTAL'


END
-EXIT


thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
November 20, 2012, 12:29 PM
reportmasterlvl3
Is there an easy way to just move the location of the row column total so that it's the first column of the report?


wFDS: 7.7.03, OS: Windows, Output: Mostly Excel
November 20, 2012, 12:46 PM
Severus.snape
I tried SEQUENCE on the Row Total but it did not like it.
I had to do it in some reports and because of the involved styling constraints I used a loop of DEFINEd variables as columns instead of ACROSS.

So yes, I think Multi Verb is the simplest way of achieving it unless someone has an easier way (hopefully).

thanks
Sashanka

This message has been edited. Last edited by: Severus.snape,


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
November 20, 2012, 01:53 PM
Tony A
Severus has already given you the easiest method possible. Any other method could involve multi-pass and/or styling.

Take this sample code which is more in tune with your example -

DEFINE FILE GGSALES
  YEAR/YY       = DATE;
  MONTH/M       = DATE;
END
TABLE FILE GGSALES
   SUM CNT.DOLLARS/I11C AS '# Rows'
       COMPUTE TOTALBAL/D20.2CM = DOLLARS + BUDDOLLARS; AS '$ Balance'
    BY PRODUCT
ACROSS YEAR     NOPRINT
ACROSS MONTH    AS 'Month'
WHERE YEAR EQ '1997'
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE ROW-TOTAL AS 'Total'
ON TABLE COLUMN-TOTAL AS 'Total'
-*ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
  INCLUDE = endeflt, $
TYPE=ACROSSVALUE, ACROSS=1, BACKCOLOR='WHITE', $
ENDSTYLE
END

and make it look like this. it's just a case of copying and pasting three lines of code. What could be simpler? Unless there's another reason that you cannot / do not like the solution that Severaus has suggested?

DEFINE FILE GGSALES
  YEAR/YY       = DATE;
  MONTH/M       = DATE;
END
TABLE FILE GGSALES
   SUM CNT.DOLLARS/I11C AS '# Rows'
       COMPUTE TOTALBAL/D20.2CM = DOLLARS + BUDDOLLARS; AS '$ Balance'
    BY PRODUCT
   SUM CNT.DOLLARS/I11C AS '# Rows'
       COMPUTE TOTALBAL/D20.2CM = DOLLARS + BUDDOLLARS; AS '$ Balance'
    BY PRODUCT
ACROSS YEAR     NOPRINT
ACROSS MONTH    AS 'Month'
WHERE YEAR EQ '1997'
ON TABLE SET PAGE-NUM NOLEAD 
-*ON TABLE ROW-TOTAL AS 'Total'
ON TABLE COLUMN-TOTAL AS 'Total'
-*ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
  INCLUDE = endeflt, $
TYPE=ACROSSVALUE, ACROSS=1, BACKCOLOR='WHITE', $
ENDSTYLE
END


Or do you actually mean that you want the totals before the BY column? If that is the case then try this -
   SUM CNT.DOLLARS/I11C AS '# Rows'
       COMPUTE TOTALBAL/D20.2CM = DOLLARS + BUDDOLLARS; AS '$ Balance'
    BY PRODUCT NOPRINT
   SUM CNT.DOLLARS/I11C AS '# Rows'
       COMPUTE TOTALBAL/D20.2CM = DOLLARS + BUDDOLLARS; AS '$ Balance'
    BY PRODUCT NOPRINT
    BY PRODUCT AS 'Product'

T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
November 20, 2012, 02:05 PM
reportmasterlvl3
Thanks, Tony. I'll try playing with that. Just looking to take this:

Type  Blue  Not Blue Total
Sedan  1    5        6
Truck  2    1        3
Van    3    1        4
Total  6    7        13


And turn it into this:
Type  Total Blue Not Blue
Sedan  6    1    5        
Truck  3    2    1        
Van    4    3    1        
Total  13   6    7 


Sorry, maybe I didn't explain it well.


wFDS: 7.7.03, OS: Windows, Output: Mostly Excel
November 20, 2012, 04:57 PM
Doug
Did SEQUENCE work?