Focal Point
[SOLVED by IB] Table(Row and Column) alignment

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

October 17, 2008, 05:02 AM
Shankar
[SOLVED by IB] Table(Row and Column) alignment
I am using below piece of code:

TABLE FILE HLDTBL
SUM
VISIT_COUNT AND ROW-TOTAL AND COLUMN-TOTAL
BY PLACE_CD AS ‘LOCATION’
ACROSS VISIT_TYPE AS ‘ ‘

The output is as:


D20 D40 D45 TOTAL

LOCATION
AMERICAS 45 40 85
ASIA 45 45
EUROPE 45 45
VESSELS 45 45
TOTAL 90 85 45 220

I want the table to be in such a format

LOCATION D20 D40 D45 TOTAL
AMERICAS 45 40 85
ASIA 45 45
EUROPE 45 45
VESSELS 45 45
TOTAL 90 85 45 220

wherein my column names should be in in a straight row.

Any solutions or views are welcomed

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


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
October 17, 2008, 08:20 AM
LEX-IA
Hi Shankar,

Using the words: ACROSS BY SAME LINE in my search I came across this thread :

https://forums.informationbuilders.com/eve/forums/a/tpc/...101043252#6101043252

Hope this helps


PROD: WebFOCUS 7.1.0 on Linux/Tomcat 5.5.12 (standalone)/Informix on AIX
TEST: WebFOCUS 7.1.3 on Linux/Tomcat 5.5.16 (standalone)/Informix on AIX
October 20, 2008, 07:43 AM
Shankar
Hi,
I used the thread provided by you.From there i got the code which i added in the existing code as:
TABLE FILE HLDTBL
SUM
VISIT_COUNT AS ''
BY PLACE_CD AS 'LOCATION’
ACROSS VISIT_TYPE AS ''

ON TABLE HOLD AS HLDTBL1
END
TABLE FILE HLDTBL1
PRINT *
ON TABLE ROW-TOTAL/I5
ON TABLE COLUMN-TOTAL/I5

Now the output is coming as :

LOCATION D20 D40 D45 TOTAL
AMERICAS 45 40 0 85
ASIA 45 0 0 45
EUROPE 0 45 0 45
VESSELS 0 0 45 45
TOTAL
90 85 45 220

Now there is a extra blank row coming up above the TOTAL values.I want it to look like:

LOCATION D20 D40 D45 TOTAL
AMERICAS 45 40 0 85
ASIA 45 0 0 45
EUROPE 0 45 0 45
VESSELS 0 0 45 45
TOTAL 90 85 45 220

When i am using LIST in place of PRINT it is showing the TOTAL values in the same row but with the serial no which i dont want.Is this possible in Webfocus?Any solutions or views are welcomed.

Thanks,


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
October 24, 2008, 03:09 PM
Kerry
Hi Shankar,

Has this issue been resolved on your side? If not, it is highly recommended that you do some SEARCH, as there are many suggestions both on Focal Point and on techsupport site. Here are a few to start with:

Subtotal data a line below description
How to print SUBTOTAL and result on the same line
How to get TOTAL and value on same line when NOPRINT is used

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
October 27, 2008, 12:54 PM
Kerry
Hi Shankar,

Here is another suggestion to try: use the last method you had, but to not do a PRINT *, do a PRINT with a BY.

TABLE FILE HLDTBL
SUM
VISIT_COUNT AS ''
BY PLACE_CD AS 'LOCATION’
ACROSS VISIT_TYPE AS ''

ON TABLE HOLD AS HLDTBL1
END
TABLE FILE HLDTBL1
PRINT D20 D40 D45 TOTAL
BY LOCATION
ON TABLE ROW-TOTAL/I5
ON TABLE COLUMN-TOTAL/I5


The main drawback is that if the number/values of the across fields change, the query would need to change as well.

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.