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.
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! This message has been edited. Last edited by: Kerry,
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.
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
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, 2007
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, 2003
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, 2007
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, 2003
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, 2003