Focal Point
PDF ??COLSPAN POSSIBILITY??

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

October 24, 2006, 12:18 PM
neuro
PDF ??COLSPAN POSSIBILITY??
I know COLSPAN is a HTML term, however is there a way to span multiple columns in the title without doing an "ACROSS" the columns I want to put a title above the regular column titles to tell the end users, that the columns below it are a part of a calculation. It seems like this would be possible even with PDF without going to the trouble of writing an ACROSS. Just seems like there would be something simple.


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
October 24, 2006, 12:22 PM
N.Selph
I don't think there is any way beyond placing the wording in the last line of the heading area, and spot marking where it should sit.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
October 24, 2006, 01:10 PM
S.J. Kadish
If you are using DevStudio you can place the multiple columns in an alignment gride. With the alignment grid you can set the alignment cell size and left-, center- or right-justify the text.


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
October 24, 2006, 03:48 PM
mgrackin
neuro,

COLSPAN should be respected for PDF output format. The keyword POSITION may be of use to you as well. Use the POSITION keyword with column notation (N1, C3, P6, or whatever) to position items in a HEADING over certain columns.

However, I have never tried/been able to force a column title to span more than one column. I should test this.

I hope this helps.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
October 24, 2006, 04:14 PM
Francis Mariani
Use spot markers to separate pieces of a heading line and then use POSITION to position a piece of the heading line over more than one column.

An example:

Heading:
" "
" "
" "
" "
"<COUNTRY_NAME<+0>Retail Exposures"
"<+0>      <+0>            <+0>     <+0>Mortgage and Home Equity Line of Credit<+0>Qualifying Revolving Retail<+0>      "
"<+0>      <+0>            <+0>     <+0>     <+0>        <+0>   Home Equity<+0>     <+0>Credit<+0> Line of<+0> Other"
"<+0>Metric<+0>Distribution<+0>Total<+0>Total<+0>Mortgage<+0>Line of Credit<+0>Total<+0>  Card<+0>  Credit<+0>Retail"


Style:
TYPE=HEADING, LINE=5, ITEM=1, POSITION=P1, $
TYPE=HEADING, LINE=5, ITEM=2, POSITION=P5, JUSTIFY=LEFT, COLOR=NAVY, $

TYPE=HEADING, LINE=6, ITEM=4, POSITION=3.5, BORDER-BOTTOM=HEAVY, $
TYPE=HEADING, LINE=6, ITEM=5, POSITION=7.1, BORDER-BOTTOM=LIGHT, $

TYPE=HEADING, LINE=7, ITEM=3, POSITION=P3, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=7, ITEM=4, POSITION=P4, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=7, ITEM=5, POSITION=P5, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=7, ITEM=6, POSITION=P6, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=7, ITEM=7, POSITION=P7, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=7, ITEM=8, POSITION=P8, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=7, ITEM=9, POSITION=P9, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=7, ITEM=10, POSITION=P10, JUSTIFY=RIGHT, $

TYPE=HEADING, LINE=8, ITEM=1, POSITION=P1, JUSTIFY=LEFT, $
TYPE=HEADING, LINE=8, ITEM=2, POSITION=P2, JUSTIFY=LEFT, $
TYPE=HEADING, LINE=8, ITEM=3, POSITION=P3, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=8, ITEM=4, POSITION=P4, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=8, ITEM=5, POSITION=P5, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=8, ITEM=6, POSITION=P6, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=8, ITEM=7, POSITION=P7, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=8, ITEM=8, POSITION=P8, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=8, ITEM=9, POSITION=P9, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=8, ITEM=10, POSITION=P10, JUSTIFY=RIGHT, $



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 25, 2006, 09:23 AM
mgrackin
Here is a simple example using the CAR file which shows how to center some HEADING (or SUBHEAD) text across multiple columns.

The key here is to use the HEADALIGN=BODY setting for the HEADING and then use the WIDTH=#.## setting to control the width on each element in the HEADING. The example includes usage of the SQUEEZE=#.## setting for each column to make sure the column widths are always the same each time the report is run. I also found that you need to use the POSITION=P1 for the first HEADING text item because the BORDER around the HEADING will be wider than the columns if you do not use this command on one field.

TABLE FILE CAR
PRINT CAR MODEL BODYTYPE SEATS
BY COUNTRY
HEADING
"Made Where?<+0>General Car Information<+0>###"
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, BORDER=LIGHT, SQUEEZE=ON,
LEFTGAP=.025, RIGHTGAP=.025,$
TYPE=REPORT, COLUMN=COUNTRY , SQUEEZE=1.50,$
TYPE=REPORT, COLUMN=CAR , SQUEEZE=1.50,$
TYPE=REPORT, COLUMN=MODEL , SQUEEZE=2.50,$
TYPE=REPORT, COLUMN=BODYTYPE, SQUEEZE=1.50,$
TYPE=REPORT, COLUMN=SEATS , SQUEEZE=0.50,$
TYPE=HEADING, HEADALIGN=BODY, BORDER=ON,$
TYPE=HEADING, LINE=1, ITEM=1, POSITION=P1, WIDTH=1.50,$
TYPE=HEADING, LINE=1, ITEM=2, WIDTH=5.50, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=1, ITEM=3, WIDTH=0.50, JUSTIFY=CENTER,$
ENDSTYLE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
October 25, 2006, 10:58 AM
neuro
Thanks everyone, I will give these ideas a shot and repond with what I ended up using. I may take off Column titles and then just add then in heading under the main heading then I can position them just the way I want. Kinda of a hybrid of multiple ideas I have been given.

Thank you very much!


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
June 03, 2008, 05:33 PM
JohnB
How do you do this for HTML output?

For example, the following report


DIV	COUNT	     $       COUNT	     $
---     -----   -----------  -----  ---------------
CE	   10	$493,700.00 	10	$493,700.00 
CORP	    8	$436,500.00 	 8	$436,500.00 
NE	    7	$304,200.00 	 7	$304,200.00 
SE	    7	$390,400.00 	 7	$390,400.00 
WE	    9	$404,400.00 	 9	$404,400.00 

 


is from the following focexec:

 
TABLE FILE EMPDATA
SUM
     CNT.PIN AS 'COUNT'
     SALARY AS '$'
     CNT.PIN AS 'COUNT'
     SALARY AS '$'
BY DIV
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='COURIER NEW',
     SIZE=10,
$
TYPE=TITLE,
     COLUMN=N1,
     COLOR=RGB(51 51 153),
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=TITLE,
     COLUMN=N2,
     COLOR=RGB(51 51 153),
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=TITLE,
     COLUMN=N3,
     COLOR=RGB(51 51 153),
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=TITLE,
     COLUMN=N4,
     COLOR=RGB(51 51 153),
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=TITLE,
     COLUMN=N5,
     COLOR=RGB(51 51 153),
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
ENDSTYLE
END
 


How can I get the report to look like this in HTML, where the phrase, "MOST RECENT STMTS" spans the 2nd and 3rd column, and the phrase "ALL HISTORICAL STMTS" spans the last 2 columns? Each phrase must be centered over the 2 columns it spans. It must look as if it is column title text, without any vertical gap or misalignment.

 
         MOST RECENT STMTS    ALL HISTORICAL STMTS 
DIV	COUNT	     $       COUNT	     $
---     -----   -----------  -----  ---------------
CE	   10	$493,700.00 	10	$493,700.00 
CORP	    8	$436,500.00 	 8	$436,500.00 
NE	    7	$304,200.00 	 7	$304,200.00 
SE	    7	$390,400.00 	 7	$390,400.00 
WE	    9	$404,400.00 	 9	$404,400.00 

  


Thank you,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
June 03, 2008, 11:22 PM
Waz
If your report is fixed, try this code.
TABLE FILE CAR
PRINT CAR       AS ' ,Car'
      MODEL     AS ' ,Model'
      BODYTYPE  AS ' ,Body Type'
      SEATS     AS ' ,Seats'
BY COUNTRY
HEADING
"Made Where?<+0>General Car Information<+0>###"
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, BORDER=LIGHT, SQUEEZE=ON,
LEFTGAP=.025, RIGHTGAP=.025,$
TYPE=REPORT, COLUMN=COUNTRY , SQUEEZE=1.50,$
TYPE=REPORT, COLUMN=CAR , SQUEEZE=1.50,$
TYPE=REPORT, COLUMN=MODEL , SQUEEZE=2.50,$
TYPE=REPORT, COLUMN=BODYTYPE, SQUEEZE=1.50,$
TYPE=REPORT, COLUMN=SEATS , SQUEEZE=0.50,$
TYPE=TITLE , COLUMN=BODYTYPE, BORDER-RIGHT=OFF, $
TYPE=REPORT, OBJECT=STRING, NAME='text1', TEXT='Details', POSITION=(6.8 1.25), DIMENSION=(1 0.474),
             font='ARIAL', color=RGB(255 0 0), style=bold  , size=12, $
TYPE=HEADING, HEADALIGN=BODY, BORDER=ON,$
TYPE=HEADING, LINE=1, ITEM=1, POSITION=P1, WIDTH=1.50,$
TYPE=HEADING, LINE=1, ITEM=2, WIDTH=5.50, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=1, ITEM=3, WIDTH=0.50, JUSTIFY=CENTER,$
ENDSTYLE
END


You could also have a look at my PDFFX routine here


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!