Focal Point
[CLOSED] wrap pdf column titles

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

March 07, 2008, 01:44 PM
MacLonghorn
[CLOSED] wrap pdf column titles
I'm trying to wrap a column title in a compute that comes after a crosstab. I've searched the forums and documentation and didn't find anything:

 
TABLE FILE CAR
SUM 
     CNT.CAR AS 'COUNT,CAR'
BY CAR NOPRINT
BY SPACER AS 'BODY TYPE'
ACROSS BODYTYPE
COMPUTE TEST/A1 = 'X'; AS 'MY WIDE, COLUMN TITLE'
ON CAR SUBHEAD
"<CAR"
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='Letter',
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=DATA,
	COLUMN=TEST, COLOR='WHITE', BACKCOLOR=RGB(100 0 0),
$
TYPE=REPORT,
	COLUMN=TEST, SQUEEZE=0.5,
$
ENDSTYLE
END
 


Doesn't seem to work...neither does the ',' in the title. Also, can you wrap column titles in PDF?

Thanks.

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


Thanks.

Mark
WF 7.6 Windows
March 07, 2008, 02:16 PM
Prarie
Look here and find Mickey's article on PDF and HTML styling. Lot's of good tips.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Excellent. Thanks I'll check it out.


Thanks.

Mark
WF 7.6 Windows
Mark,

You cannot wrap a TITLE for a COMPUTE which appears after an ACROSS.

The reason why is complicated but basically the TITLE for the COMPUTES after an ACROSS are treated like data values, not TITLEs. Therefore adding commas to the AS 'Whatever' for the COMPUTEs will not make it wrap.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
Yeah, I noticed that recently when I BOLDed my ACROSSVALUES and those COMPUTE titles were also bolded. I wonder if I'm able to wrap across values, and if so, would it wrap those titles? I'll soon find out. Thanks Mickey.


Thanks.

Mark
WF 7.6 Windows
Mac, did you ever solve this problem?
i'm struggling with the same thing.
I just want to WRAP my column titles.
i've memorized Mickey's articles, but there's nothing there about titles,
It just doesn't seem to work.
i still get the !
ah..heres the answer
http://techsupport.information...om/sps/20092010.html
now i'm going to try to get it to work on ACROSSVALUEs




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
I have never managed to wrap an across value.

This definitely does not work, you can wrap and acrosscolumn, but not an acrossvalue:

TABLE FILE CENTORD
SUM PRODCAT
ACROSS PRODNAME AS ''
ON TABLE SET STYLESHEET *
TYPE=REPORT, FONT='ARIAL', SIZE=9, ORIENTATION=LANDSCAPE, SQUEEZE=ON, LEFTGAP=0.1, RIGHTGAP=0.1, $

TYPE=ACROSSVALUE, COLOR=BLUE, WRAP=0.5, $

TYPE=REPORT, ACROSSCOLUMN=PRODCAT, COLOR=GREEN, WRAP=0.5, $

ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END



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
Mickey has a workaround:

[SOLVED] wrap in a stylesheet

Quoting N.Selph in Wrap an Across Column, "It is a documented limitation at least in version 5.21 for PDF. I don't know if it was fixed in a later release"

- it ain't working in v7.6.5.


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
Lots of feedback to be found on wrapping ACROSSVALUES. I was wondering if anyone had any feedback on Susannah's post, wrapping PDF column titles. I know about the comma trick per the post she references, but didn't know if there was something a bit more dynamic.

I'm considering writing a function to insert the comma. Anyone already have that or is it a simpler solution than that?

- ABT



quote:
Originally posted by susannah:
Mac, did you ever solve this problem?
i'm struggling with the same thing.
I just want to WRAP my column titles.
i've memorized Mickey's articles, but there's nothing there about titles,
It just doesn't seem to work.
i still get the !
ah..heres the answer
http://techsupport.information...om/sps/20092010.html
now i'm going to try to get it to work on ACROSSVALUEs



------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
Reclosing this. I discovered that IBI provides the PARAG function which gets me 99.5% there (just have to trim out some trailing whitespace to avoid extra breaks).

- ABT

NUMTEXT/A100 = PARAG(100, NUMTEXT_1, ',', 40, NUMTEXT);
DEMTEXT/A100 = PARAG(100, DEMTEXT_1, ',', 40, DEMTEXT);


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
sweet




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
As it turns out, jgross had an article (http://www.informationbuilders.com/support/developers/WrapACROSS) that got me the other .5% there (by implicating the GETTOK/concatenate option). Here's what I settled on:

DEFINE FILE VW_INDICATORMETRICVALUES_NUMDEM
	NUMTEXT_1/A100 = TRIM('T', NUM_TEXT, 100, ' ', 1, 'A100');
	DEMTEXT_1/A100 = TRIM('T', DEM_TEXT, 100, ' ', 1, 'A100');

    LGA40/A100 = PARAG(100,NUMTEXT_1,'\',40,'A100');
    LINE1/A40  = GETTOK(LGA40,100, 1, '\',40,'A40');
    LINE2/A40  = GETTOK(LGA40,100, 2, '\',40,'A40');

	NUMTEXT_OUT/A101V = LINE1 |',' | LINE2;

    LGA40/A100 = PARAG(100,DEMTEXT_1,'\',40,'A100');
    LINE1/A40  = GETTOK(LGA40,100, 1, '\',40,'A40');
    LINE2/A40  = GETTOK(LGA40,100, 2, '\',40,'A40');

	DEMTEXT_OUT/A101V = LINE1 |',' | LINE2;

END

TABLE FILE VW_INDICATORMETRICVALUES_NUMDEM
SUM
	MAX.NUMTEXT_OUT AS 'NUMTEXT'
	MAX.DEMTEXT_OUT AS 'DEMTEXT'

WHERE OrgUnitShortName EQ '&UNIT';
WHERE OrgEntityNo EQ '&ORG';
WHERE IndicatorName EQ '&IND';
WHERE Year EQ &FY;

ON TABLE HOLD AS BT_NUMDEM_NAMES FORMAT ALPHA
END


-RUN
-READ BT_NUMDEM_NAMES &NUMTEXT.A101V. &DEMTEXT.A101V.
-RUN


-SET &NUMTEXT = EDIT(&NUMTEXT, '$$$$$$9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999');
-SET &DEMTEXT = EDIT(&DEMTEXT, '$$$$$$9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999');



I'll be the first to say this could be done better, but it's good enough for the time being. I'd really like to see it calculate the halfway point of the text in the field and set that value in PARAG (so that the values look roughly equal). Too much to do to mess around with that for now...

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
well, you could use the ARGLEN function to measure how long the text field's content actually is.
and divide by 2
'course you might be cutting a word in half.
but you could take the ARGLEN/2 minus, say, 10
and then check for the next blank using the POSIT function, starting with ARGLEN-10...