Focal Point
Subheading or subtitling each row, give separate column head for each row

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

February 03, 2011, 01:00 AM
MKS
Subheading or subtitling each row, give separate column head for each row
Is it possible to give separate column head for each separate row

For example I have output as

ID | Paid | Status
--------------------------
1 | 23 | A
2 | 24 | B
3 | 21 |C

Now I would like the out output as

Employee ID | Amt For status A
---------------------------------------------
1 | 23
-----------------------------------------------
Employee ID|Amt for status B
----------------------------------------------
2 | 24
------------------------------------------------
Employee ID | Amt for Status C
-------------------------------------------------
3 | 21

I see Subheading option but with that we can only give some kind of heading to each row.

I just need the column heading to come repeated so that the alignment is not disturbed.

Thank You
Sakeesh

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


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
February 03, 2011, 02:24 AM
Dan Satchell
Maybe something like this:

TABLE FILE CAR
 SUM SALES/D7 AS ''
 COMPUTE SALES_TXT/A35 = 'Total Sales for ' | COUNTRY ; NOPRINT
 COMPUTE COUNTER/I5 = LAST COUNTER + 1 ; NOPRINT
 BY CAR     AS '' 
 BY COUNTRY NOPRINT
 ON COUNTRY SUBHEAD
  "Car<SALES_TXT"
  WHEN COUNTER EQ 1 ;
 ON COUNTRY SUBHEAD
  " <SALES_TXT"
  WHEN COUNTER GT 1 ;
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  FONT='ARIAL', SIZE=10, JUSTIFY=CENTER, $
  TYPE=SUBHEAD, HEADALIGN=BODY, STYLE=BOLD, BACKCOLOR=PALE GREEN, $
  TYPE=DATA, JUSTIFY=CENTER, $
 ENDSTYLE
END



WebFOCUS 7.7.05
February 03, 2011, 02:37 AM
Ramkumar - Webfous
  
TABLE FILE CAR
BY CAR
ON TABLE HOLD AS READFILE FORMAT ALPHA
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN

-REPEAT :LB1 FOR &I FROM 1 TO &LINES;
-READ READFILE, &CARVAL&I.EVAL
-:LB1
-RUN


-REPEAT :LB2 FOR &I FROM 1 TO &LINES;
TABLE FILE CAR
PRINT
DEALER_COST AS 'DELAER COST FOR &CARVAL&I.EVAL' 
SEATS
END
-RUN
-:LB2


This is something that you are looking at... Until status changes every row, this will happen every row.

But to add Data FIELD(a BY Field) to TITLE is not possible in a direct way...

This has gone on Forums already...


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
February 03, 2011, 03:12 AM
Ramkumar - Webfous
Hi Dan,

Your variant is a nice Idea. But as per MKS, he needs to print the title Info(CAR / Employee ID) every row...

So this should be fine I guess... Without counter and WHEN.

  TABLE FILE CAR
 SUM SALES/D7 AS ''
 COMPUTE SALES_TXT/A35 = 'Total Sales for ' | COUNTRY ; NOPRINT
 BY CAR     AS '' 
 BY COUNTRY NOPRINT
 ON COUNTRY SUBHEAD
  "Car<SALES_TXT"
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  FONT='ARIAL', SIZE=10, JUSTIFY=CENTER, $
  TYPE=SUBHEAD, HEADALIGN=BODY, STYLE=BOLD, BACKCOLOR=PALE GREEN, $
  TYPE=DATA, JUSTIFY=CENTER, $
 ENDSTYLE
END



Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
February 03, 2011, 04:31 AM
OPALTOSH
Use a PAGE-BREAK on ID

BY ID AS 'Employee' PAGE-BREAK

combined with turning off page numbering and you will get what you want.
February 03, 2011, 06:58 AM
Ramkumar - Webfous
quote:
Amt for status B

quote:
Use a PAGE-BREAK on ID

BY ID AS 'Employee' PAGE-BREAK

combined with turning off page numbering and you will get what you want.


Hi OPALTOSH,

In that case 'Amt for status B' 'Amt for status C' - The status field will not be included in Title as required by MKS. He wants STATUS values to be part Column Title.....


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5