Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] wrap in a stylesheet

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] wrap in a stylesheet
 Login/Join
 
Master
posted
I have created a little fex to try to wrap the
MODEL field, which would allow me to the narrow the width of the DEALER_COST AS 'D'
and RETAIL_COSTAS 'R' fields which I want to display beneath it.

Anyone have any ideas?

Here is the code:

[
-*
-* A LESSON ON STYLESHEETS
-*
TABLE FILE CAR
PRINT
DEALER_COST/D2 AS 'D'
RETAIL_COST/D2 AS 'R'
SALES/I2 AS 'S '
BY COUNTRY
BY CAR
ACROSS MODEL
ON TABLE SET PAGE NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=ON,
FONT='TIMES NEW ROMAN',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=REPORT,
COLUMN=N0,
SQUEEZE=0.250000,
$
ENDSTYLE
END
]

Thanks! Idea

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Platinum Member
posted Hide Post
Try changing "SQUEEZE" to "WRAP" and converting the numeric fields to alphanumeric formats.

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
John right,as far as I am aware you cannot wrap a numeric.

Should you be minimising th size of you numbers, say 2000 as 2K etc.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
Per John's suggestion, I have changed "SQUEEZE" to "WRAP" and converted the numeric fields to alphanumeric formats.
I still cannot get the model field to wrap.
Frowner
Here is the code:
[
TABLE FILE CAR
PRINT
DEALER_COST/D7 NOPRINT
COMPUTE ALPHA_D/A14 = FTOA(DEALER_COST, '(D7)', ALPHA_D); AS 'D'
-*
RETAIL_COST/D7 AS 'R' NOPRINT
COMPUTE ALPHA_R/A14 = FTOA(RETAIL_COST, '(D7)', ALPHA_D); AS 'R'
-*
SALES/I6 NOPRINT
COMPUTE SALES_F/F6 = SALES; NOPRINT
COMPUTE ALPHA_S/A14 = FTOA(SALES_F, '(F6)', ALPHA_S); AS 'S'
-* COMPUTE ZLPHA_S/A16 = '"' || ALPHA_S || '"'; AS 'Z'
BY COUNTRY
BY CAR
ACROSS MODEL
ON TABLE SET PAGE NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=ON,
FONT='TIMES NEW ROMAN',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=REPORT,
COLUMN=N0,
WRAP=0.250000,
$
ENDSTYLE
END
-RUN
-*
-EXIT

]


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Virtuoso
posted Hide Post
A couple of things - since the column you are wanting to shrink is an ACROSS column, you are not using the correct keyword in your stylesheet - it would have to be ACROSSVALUE -
TYPE=ACROSSVALUE, ACROSS=MODEL, COLOR=RED, WRAP=0.5,$ .

That being said, I don't think you can do what you are trying to do in PDF or EXL2K format. It will only work for HTML. Sounds weird, I know but if you think about it, PDF must respect ALL spaces and column widths for fields so the width of the MODEL column would have to be controlled by the combined width of all the columns within that ACROSS column.

THAT being said, if you turn SQUEEZE=OFF (with HTMLCSS ON) in HTML format, the individual column widths are extended (not squeezed) but the column title IS wrapped appropriately. Hmmmm

I would go ahead and open a case with tech support on this one


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
Tom,

Try removing the COLUMN=N0, declaration.

Regards,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Virtuoso
posted Hide Post
The values for the ACROSS field are basically untouchables due to the way FOCUS handles them. I even tried using the LINEBREAK stylesheet command and it still does not make the ACROSS values WRAP. I have one more idea to test. It ain't pretty but it might be good enough to use. I will post some code as soon as I can.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Mickey - the weird thing is that your statement is only true for PDF/EXL2K - wrap on across works fine in HTML.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Darin,

That's because HTML is a whole different animal. The very nature of the browser displaying HTML has the dynamic wrapping behavior builtin. This is core HTML behavior which ahs nothing to do with WebFOCUS. I talk about this in my first article about HTML and PDF Report Design.

The following is an ugly solution to the issue at hand.

DEFINE FILE CAR
NEWMODEL/A24=PARAG(24, MODEL, ';', 8, NEWMODEL);
MODELP1/A8=GETTOK(NEWMODEL, 24, 1, ';', 8, MODELP1);
MODELP2/A8=GETTOK(NEWMODEL, 24, 2, ';', 8, MODELP2);
MODELP3/A8=GETTOK(NEWMODEL, 24, 3, ';', 8, MODELP3);
END
TABLE FILE CAR
SUM RCOST
ACROSS MODEL NOPRINT
ACROSS MODELP1 AS 'MODEL'
ACROSS MODELP2 AS ''
ACROSS MODELP3 AS ''
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'W GERMANY'
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, ORIENTATION=LANDSCAPE, SQUEEZE=ON, WRAP=0.75,$
ENDSTYLE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Here's a better looking version:

DEFINE FILE CAR
NEWMODEL/A24=PARAG(24, MODEL, ';', 8, NEWMODEL);
MODELP1/A8=GETTOK(NEWMODEL, 24, 1, ';', 8, MODELP1);
MODELP2/A8=GETTOK(NEWMODEL, 24, 2, ';', 8, MODELP2);
MODELP3/A8=GETTOK(NEWMODEL, 24, 3, ';', 8, MODELP3);
END
TABLE FILE CAR
SUM RCOST
ACROSS MODEL NOPRINT
ACROSS MODELP1 AS 'MODEL'
ACROSS MODELP2 AS ''
ACROSS MODELP3 AS ''
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'W GERMANY'
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, ORIENTATION=LANDSCAPE, FONT='ARIAL',
SQUEEZE=ON, WRAP=0.75,$
TYPE=REPORT, COLUMN=COUNTRY, WRAP=1.00,$
TYPE=ACROSSVALUE, ACROSS=MODELP1, COLOR=RED,
BORDER-LEFT=MEDIUM,BORDER-RIGHT=MEDIUM,BORDER-TOP=MEDIUM,$
TYPE=ACROSSVALUE, ACROSS=MODELP2, COLOR=RED,
BORDER-LEFT=MEDIUM,BORDER-RIGHT=MEDIUM,$
TYPE=ACROSSVALUE, ACROSS=MODELP3, COLOR=RED,
BORDER-LEFT=MEDIUM,BORDER-RIGHT=MEDIUM,$
TYPE=ACROSSTITLE, ACROSS=MODELP1, BACKCOLOR=NAVY, COLOR=WHITE,$
TYPE=TITLE, BORDER=MEDIUM, BACKCOLOR=NAVY, COLOR=WHITE,$
TYPE=DATA , BORDER=MEDIUM,$
ENDSTYLE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Master
posted Hide Post
quote:
mgrackin

mgrackin AND others

Thanks very much :> !


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Member
posted Hide Post
quote:
TYPE=ACROSSVALUE, ACROSS=MODELP1, COLOR=RED,
BORDER-LEFT=MEDIUM,BORDER-RIGHT=MEDIUM,BORDER-TOP=MEDIUM,$
TYPE=ACROSSVALUE, ACROSS=MODELP2, COLOR=RED,
BORDER-LEFT=MEDIUM,BORDER-RIGHT=MEDIUM,$
TYPE=ACROSSVALUE, ACROSS=MODELP3, COLOR=RED,
BORDER-LEFT=MEDIUM,BORDER-RIGHT=MEDIUM,$



Thanks for the post. This saved the day today.
 
Posts: 18 | Registered: August 25, 2006Report This Post
Gold member
posted Hide Post
mgrackin,
Thanks for the work-around method.
it is messy, but it works.
Thanks!


WebFOCUS 8.2.01 AppStudio
HTML, PDF, Excel
 
Posts: 61 | Registered: March 12, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] wrap in a stylesheet

Copyright © 1996-2020 Information Builders