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     [SHARING] PDF Wrapping to the next line - not the next page

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] PDF Wrapping to the next line - not the next page
 Login/Join
 
Member
posted
Hi all,

My first time on Focal Point as a subscriber but have used for many years to find solutions. So I thought I would try and pay back for all the help the community has given.

Anyway the issue that I faced was the ability to wrap columns to the next line in a PDF as opposed to the standard behavior which is to go to the next page.

The code uses FML to produce the desired result.

-SET &ECHO=ALL;

-* since the columns are selected, assume it's in a list somewhere either as variables, or in a file
-* put into a file (I'm calling it columns.lst).
TABLE FILE CAR
BY SEATS
ON TABLE SAVE AS COLS
ON TABLE SET HOLDLIST PRINTONLY
END

-*FILEDEF COLS DISK c:\work\columns.lst
-RUN
-* &NC is the number of columns that fit on a page
-SET &NC = 2;

-SET &COL2='...';
-SET &LOOPCTR = 0;

-* read values in sets of &NC
-COLREAD
-SET &LOOPCTR = &LOOPCTR + 1;
-*did we reach EOF on last read?
-IF &COL2 EQ ' ' GOTO WRAP;
-READ COLS,&COL1

-IF &COL1 EQ ' ' GOTO WRAP;
-IF &IORETURN EQ 0 GOTO GETCOL2;
-SET &COL2 = ' ';
-GOTO DOIT

-GETCOL2
-READ COLS, &COL2
-SET &COL2 = IF &IORETURN NE 0 THEN ' ' ELSE &COL2;

-DOIT
-SET &COL1 = '''' | &COL1 || '''';
-SET &COL2 = IF &COL2 EQ ' ' THEN ' ' ELSE 'OR ''' | &COL2 | '''';

-SET &OPEN = IF &LOOPCTR EQ 1 THEN 'OPEN' ELSE ' ';
DEFINE FILE CAR
CONTINENT/A10 = IF COUNTRY EQ 'JAPAN' THEN 'ASIA' ELSE 'EUROPE';
END
TABLE FILE CAR
SUM
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SEATS
-*BY CONTINENT
ACROSS CAR.BODY.SEATS
FOR CAR.ORIGIN.COUNTRY
ENGLAND OVER
FRANCE OVER
ITALY OVER
JAPAN OVER
'W GERMANY'
WHERE SEATS EQ &COL1 &COL2
ON TABLE SET ASNAMES ON
ON TABLE PCHOLD FORMAT PDF &OPEN NOBREAK
-*ON TABLE HOLD FORMAT PDF
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE SET BYDISPLAY ON
ON TABLE SET BYPANEL ON
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,
$
TYPE=ACROSSVALUE,
BACKCOLOR='NONE',
JUSTIFY=LEFT,
$
ENDSTYLE
END

-GOTO COLREAD

-WRAP
-* dummy table to close everything
TABLE FILE CAR
PRINT COMPUTE X/A1='.'; AS ''
BY COUNTRY NOPRINT
IF RECORDLIMIT EQ 1
ON TABLE SET DROPBLNKLINE ON
ON TABLE PCHOLD FORMAT PDF CLOSE
ON TABLE SET STYLE *
TYPE=DATA, SIZE=1,COLOR=WHITE,$
ENDSTYLE
END

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8203M
O/S Windows 7
 
Posts: 7 | Registered: August 02, 2017Report This Post
Virtuoso
posted Hide Post
MAK, since this is not a question and that you're sharing a trick with us, I suggest that you edit your post and add [SHARING] at the beginning of the subject.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
MAK

That is awesome that your first post is helping others.. Keep them coming!


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report 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     [SHARING] PDF Wrapping to the next line - not the next page

Copyright © 1996-2020 Information Builders