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     Milti-Line Title in PDF Format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Milti-Line Title in PDF Format
 Login/Join
 
Platinum Member
posted
I have realized that the Dev Studio restrict the number of lines in the column title to 5. Without using Dev Studio if I add more than 5 lines for a column title then I am getting an error. I am reading the title values dynamically. I am replacing the spaces in the title with commas to wrap the title in the PDF version. Sometimes, there can be more than 5 lines. Is there a work around?

TABLE FILE CAR
PRINT
COUNTRY AS 'THIS,IS,MULTIPLE,LINE,TITLE,FOR,PDF,VERSION,ONLY'
END

'Unknown error occurred. Agent on reporting server EDASERVE may have crashed....'


WebFOCUS 8207.11
App Studio 8207
 
Posts: 146 | Registered: January 06, 2009Report This Post
Expert
posted Hide Post
I was going to suggest MARKUP=ON and use the BR tag, but that just trashed the report.

TABLE FILE CAR
PRINT 
COUNTRY AS 'THIS<BR>IS<BR>MULTIPLE<BR>LINE<BR>TITLE<BR>FOR<BR>PDF<BR>VERSION<BR>ONLY'
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
MARKUP=ON, $
ENDSTYLE
END


Weird.

I would suggest adding your column titles to the HEADING.

TABLE FILE CAR
HEADING
"THIS"
"IS"
"MULTIPLE"
"LINE"
"TITLE"
"FOR"
"PDF"
"VERSION"
"ONLY<+0>CAR"
PRINT 
COUNTRY AS ''
CAR     AS ''
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=HEADING, LINE=9, ITEM=1, STYLE=UNDERLINE, $
TYPE=HEADING, LINE=9, ITEM=2, STYLE=UNDERLINE, POSITION=CAR, $
ENDSTYLE
END


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
Platinum Member
posted Hide Post
Thanks Waz. Putting the titles in the heading or subhead is not an option for me. Although IBI recommends using PDF for printing purposes there are many issues with PDF format. To name some, we cannot put borders around the items in the heading or subheadings, titles will not wrap automatically based on the column width, page numbering gets messed up with compound PDF, 5 line restriction in the title, etc. These are very basic features. Clients raise their eyebrows when we go them with our inability to perform these simple features.

I was thinking of using carriage return in the string (Not in Define but in the Dialogue Manager). Do you have any examples?
Mad Mad

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


WebFOCUS 8207.11
App Studio 8207
 
Posts: 146 | Registered: January 06, 2009Report This Post
Expert
posted Hide Post
What version of WebFOCUS are you on ?


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
Gold member
posted Hide Post
This is kind of a round a bout method but could use the MacGyver to do something similar as what you want for a header. Here is an example based on the CAR table.

FILEDEF MCGMAS DISK MACGYVER.MAS
FILEDEF MCGDAT DISK MACGYVER.DAT
-RUN
-WRITE MCGMAS FILE=MACGYVER,SUFFIX=FOC
-WRITE MCGMAS SEGNAME=MAC1,SEGTYPE=S1
-WRITE MCGMAS   FIELD=BLANK  ,     ,A1,INDEX=I,$
-WRITE MCGMAS SEGNAME=MAC2,SEGTYPE=S1,PARENT=MAC1
-WRITE MCGMAS   FIELD=COUNTER,ORDER,I4,$
-RUN

 CREATE FILE MACGYVER
 MODIFY FILE MACGYVER
 COMPUTE CTR/I9=;
 FIXFORM 2(CTR/4 X-4)
 COMPUTE
   BLANK=' ';
   COUNTER=IF COUNTER EQ 0 THEN CTR ELSE COUNTER+1;
 MATCH BLANK
    ON MATCH CONTINUE
    ON NOMATCH INCLUDE
 MATCH COUNTER
    ON MATCH CONTINUE
    ON NOMATCH INCLUDE
 DATA
1
 END
-RUN

JOIN
BLANK WITH COUNTRY IN CAR TO
BLANK IN MACGYVER AS B_
END

DEFINE FILE CAR
BLANK/A1 WITH COUNTRY=' ';
LF/A1 = HEXBYT(10, 'A1');
COUNTRY_NEW/A63=IF COUNTER EQ 1 THEN 'THIS'|LF|'IS'|LF|'MULTIPLE'|LF|'LINE'|LF|'TITLE'|LF|'FOR'|LF|'PDF'|LF|'VERSION'|LF|'ONLY' ELSE COUNTRY;
END
TABLE FILE CAR
BY  COUNTER NOPRINT 
BY  COUNTRY_NEW AS ''
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
$
     DEFMACRO=COND0001,
     MACTYPE=RULE,
     WHEN=COUNTER EQ 1,
$
TYPE=DATA,
     BORDER-BOTTOM=MEDIUM,
     MACRO=COND0001,
$
TYPE=REPORT, LINEBREAK=LF,SQUEEZE=1.5,$
ENDSTYLE
END


WF: 8201, OS: Windows, Output: HTML, PDF, Excel
 
Posts: 78 | Registered: November 08, 2010Report This Post
Virtuoso
posted Hide Post
I managed to produce this in PDF but the styling looks rather crazy because it was all done in Report Painter:



This makes use of the Alignment Grid feature introduced (I think) in 7.6.10 ...

I'll try to manually alter it so it takes less than 846 lines before posting Frowner



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
You dream of owning a Datsun...... Yeh, me too. Big Grin


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
Virtuoso
posted Hide Post
quote:
You dream of owning a Datsun


It seems to be the most affordable of them all Wink



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Wow! Report Painter is really verbose (expressive?) when it comes to StyleSheet declarations. I managed to remove more than a few lines that added no significant value ... I didn't clean the whole thing up though ...

Here's the code in a more "readable" format Sweating

DEFINE FILE CAR
CTR/I4=CTR + 1;
BRK/A1=' ';
END
TABLE FILE CAR
PRINT 
 CAR.COMP.CAR AS ''
 CAR.CARREC.MODEL AS ''
 CAR.BODY.SEATS AS ''
 CAR.BODY.RETAIL_COST AS ''
BY  LOWEST BRK NOPRINT 
BY  LOWEST CAR.ORIGIN.COUNTRY AS ''
 
ON BRK SUBFOOT
"Total number of cars: <+0> <TOT.CTR"
HEADING
"List of Cars by Country"
"Run date: &DATEtMDYY"
" <+0> <+0> <+0> <+0> "
"This<+0>And I<+0> <+0> <+0> "
"is<+0>would<+0> <+0> <+0>Oh!"
"one<+0>really<+0>What<+0> <+0>This"
"of my<+0>enjoy<+0>would it<+0> <+0>is"
"favourite<+0>owning<+0>feel like<+0> <+0>not"
"countries<+0>a brand<+0>driving this<+0> <+0>very"
"!!!<+0>like this<+0>beauty?<+0>Seats<+0>cheap :("
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
 INCLUDE = endeflt,
$
TYPE=DATA, BORDER=LIGHT, $
TYPE=DATA, COLUMN=N5, JUSTIFY=CENTER, $
TYPE=HEADING, HEADALIGN=BODY, $
TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=1, SIZE=14, COLSPAN=5, JUSTIFY=LEFT, $
TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=1, COLSPAN=5, JUSTIFY=LEFT, $
TYPE=HEADING, LINE=3, OBJECT=TEXT, ITEM=1, COLSPAN=1, JUSTIFY=LEFT, $
TYPE=HEADING, LINE=3, OBJECT=TEXT, ITEM=2, COLSPAN=1, JUSTIFY=LEFT,$
TYPE=HEADING, LINE=3, OBJECT=TEXT, ITEM=3, COLSPAN=1, JUSTIFY=LEFT,$
TYPE=HEADING, LINE=3, OBJECT=TEXT, ITEM=4, COLSPAN=1, JUSTIFY=LEFT,$
TYPE=HEADING, LINE=3, OBJECT=TEXT, ITEM=5, COLSPAN=1, JUSTIFY=LEFT,$
TYPE=HEADING, LINE=4, BACKCOLOR='SILVER', $
TYPE=HEADING, LINE=4, OBJECT=TEXT, ITEM=1, BORDER-TOP=LIGHT, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=4, OBJECT=TEXT, ITEM=2, BORDER-TOP=LIGHT, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=4, OBJECT=TEXT, ITEM=3, BORDER-TOP=LIGHT, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=4, OBJECT=TEXT, ITEM=4, BORDER-TOP=LIGHT, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=4, OBJECT=TEXT, ITEM=5, BORDER-TOP=LIGHT, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=5, BACKCOLOR='SILVER',$
TYPE=HEADING, LINE=5, OBJECT=TEXT, ITEM=1, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=5, OBJECT=TEXT, ITEM=2, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=5, OBJECT=TEXT, ITEM=3, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=5, OBJECT=TEXT, ITEM=4, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=5, OBJECT=TEXT, ITEM=5, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=OFF, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=6, BACKCOLOR='SILVER',$
TYPE=HEADING, LINE=6, OBJECT=TEXT, ITEM=1, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=6, OBJECT=TEXT, ITEM=2, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=6, OBJECT=TEXT, ITEM=3, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=6, OBJECT=TEXT, ITEM=4, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=6, OBJECT=TEXT, ITEM=5, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=OFF, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=7, BACKCOLOR='SILVER',$
TYPE=HEADING, LINE=7, OBJECT=TEXT, ITEM=1, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=7, OBJECT=TEXT, ITEM=2, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=7, OBJECT=TEXT, ITEM=3, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=7, OBJECT=TEXT, ITEM=4, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=7, OBJECT=TEXT, ITEM=5, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=OFF, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=8, BACKCOLOR='SILVER',$
TYPE=HEADING, LINE=8, OBJECT=TEXT, ITEM=1, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=8, OBJECT=TEXT, ITEM=2, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=8, OBJECT=TEXT, ITEM=3, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=8, OBJECT=TEXT, ITEM=4, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=8, OBJECT=TEXT, ITEM=5, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=OFF, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=9, BACKCOLOR='SILVER',$
TYPE=HEADING, LINE=9, OBJECT=TEXT, ITEM=1, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=9, OBJECT=TEXT, ITEM=2, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=9, OBJECT=TEXT, ITEM=3, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=9, OBJECT=TEXT, ITEM=4, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=9, OBJECT=TEXT, ITEM=5, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=OFF, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=10, BACKCOLOR='SILVER',$
TYPE=HEADING, LINE=10, OBJECT=TEXT, ITEM=1, BORDER-TOP=OFF, BORDER-BOTTOM=LIGHT, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=10, OBJECT=TEXT, ITEM=2, BORDER-TOP=OFF, BORDER-BOTTOM=LIGHT, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=10, OBJECT=TEXT, ITEM=3, BORDER-TOP=OFF, BORDER-BOTTOM=LIGHT, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=10, OBJECT=TEXT, ITEM=4, BORDER-TOP=OFF, BORDER-BOTTOM=LIGHT, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=10, OBJECT=TEXT, ITEM=5, BORDER-TOP=OFF, BORDER-BOTTOM=LIGHT, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,
              SIZE=9, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=SUBFOOT, BORDER-TOP=LIGHT, BORDER-BOTTOM=MEDIUM, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, BORDER-TOP-COLOR=RGB(52 55 58),
              BORDER-BOTTOM-COLOR=RGB(52 55 58), BACKCOLOR='SILVER',$
TYPE=SUBTOTAL, BACKCOLOR='SILVER',$
TYPE=REPORT, COLUMN=N5, WRAP=0.500000,$
TYPE=REPORT, COLUMN=N6, WRAP=0.500000,$
ENDSTYLE
END



Weird enough, it only works with PDF, the one format that usually gives us the most headaches Confused



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
WFConsultant's signature says WebFOCUS 7.x.

Your solution does not work in 7.6.9, lets hope WFConsultant's got 7.7.


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
Virtuoso
posted Hide Post
quote:
This makes use of the Alignment Grid feature introduced (I think) in 7.6.10 ...

That's true Waz and it is why I included that caveat before. As you say, 7.x encompasses a whole range of releases in it so hopefully WFConsultant's is at least 7.6.1x.

The change introduced was actually the capability of having HEADALIGN=BODY recognized and exploited in PDF documents which opens up a lot of styling possibilities (like COLSPAN) not available before for that output format.

Fingers crossed ...



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
You indicated in the original post that you "read" the title values dynamically. If so, you may be able to use something like the code below to divide your titles into chunks that will not exceed the maximum number of title lines. It uses the PARAG function to split the titles into roughly equal-length lines.

SET DMPRECISION=0
-RUN
-SET &TITLE1        = 'THIS IS THE FIRST MULTIPLE LINE TITLE FOR COLUMN COUNTRY';
-SET &TITLE2        = 'THIS IS THE SECOND MULTIPLE LINE TITLE FOR COLUMN CAR';
-SET &TITLE3        = 'THIS IS A REALLY REALLY REALLY LONG MULTIPLE LINE TITLE FOR COLUMN MODEL TO TEST OUTPUT IN PDF FORMAT'; 
-SET &TITLE1_LENGTH = ARGLEN(&TITLE1.LENGTH,&TITLE1,'I5');
-SET &TITLE2_LENGTH = ARGLEN(&TITLE2.LENGTH,&TITLE2,'I5');
-SET &TITLE3_LENGTH = ARGLEN(&TITLE3.LENGTH,&TITLE3,'I5');
-SET &SUBSIZE1      = &TITLE1_LENGTH / 4 ;
-SET &SUBSIZE2      = &TITLE2_LENGTH / 4 ;
-SET &SUBSIZE3      = &TITLE3_LENGTH / 4 ;
-SET &TITLE_COUNTRY = PARAG(&TITLE1.LENGTH,&TITLE1,',',&SUBSIZE1,'A&TITLE1.LENGTH');
-SET &TITLE_CAR     = PARAG(&TITLE2.LENGTH,&TITLE2,',',&SUBSIZE2,'A&TITLE2.LENGTH');
-SET &TITLE_MODEL   = PARAG(&TITLE3.LENGTH,&TITLE3,',',&SUBSIZE3,'A&TITLE3.LENGTH');
-*
TABLE FILE CAR
 PRINT
  COUNTRY AS '&TITLE_COUNTRY'
  CAR     AS '&TITLE_CAR'
  MODEL   AS '&TITLE_MODEL'
 ON TABLE PCHOLD FORMAT PDF
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
This creates the multiple titles and a line of dashes followed by the detail. It creates dummy rows for the titles and dashes and calulates the number of required pages based upon the data and your required number of rows per page (detail rows p/p plus 2). This requires multiple passes but does work.

  
-*Workaround example when requiring more than 5 (WF limit) lines in a column title (PDF).
-*
APP PREPENDPATH IBISAMP
SET ASNAMES=ON
-*Get total record count
TABLE FILE GGSALES
SUM CNT.CATEGORY
ON TABLE SAVE AS S1
END
-RUN
-READ S1 &RECCNT.I5
-*
-*Set your required lines per page (including 2 title lines (text is one line, dashes as second line)
-SET &NUM_LINES = 32;
-*Calc number of pages required
-SET &PGS = (&RECCNT / (&NUM_LINES-2) )+ 1;
-*
-* CNTR* fields calculate the sort order of Title Text followed by Dashes followed by detail lines.
DEFINE FILE GGSALES
CNTR0/I5 WITH CATEGORY = CNTR0+1;
CNTR1/I5 WITH CATEGORY = IF CNTR0 EQ 1 THEN 1 ELSE (&NUM_LINES * (CNTR0-1)) + 1;
CNTR2/I5 WITH CATEGORY = CNTR1+1;
CNTR3/I5 WITH CATEGORY = CNTR2+1;
CNTR4/I5 WITH CATEGORY = IF CNTR0 EQ 1 THEN 1 ELSE IF LAST CNTR4 EQ (&NUM_LINES - 2) THEN 1 ELSE CNTR4 + 1;
CNTR5/I5 WITH CATEGORY = IF CNTR0 EQ 1 THEN 3 ELSE IF CNTR4 EQ 1 THEN CNTR5+3 ELSE CNTR5+1;
CATX/A11 WITH CATEGORY = ' ';
DATEX/I8YYMD WITH CATEGORY =;
CITYX/A20 WITH CATEGORY = 'X';
CATY/A11 WITH CATEGORY = ' ';
DATEY/I8YYMD WITH CATEGORY =;
CITYY/A20 WITH CATEGORY = 'Y';
END
-*
-*Create a file with a dummy row for title line text for each needed page (&PGS)
TABLE FILE GGSALES
PRINT CNTR1 AS CNTR CATX AS CATEGORY DATEX AS DATE CITYX AS CITY
IF RECORDLIMIT EQ &PGS
ON TABLE HOLD AS HOLD1
END
-RUN
-*
DEFINE FILE GGSALES ADD
CATY/A11 WITH CATEGORY = ' ';
DATEY/I8YYMD WITH CATEGORY =;
CITYY/A20 WITH CATEGORY = 'Y';
END
-*
-*Create a file with a dummy row for dashes for each needed page (&PGS)
TABLE FILE GGSALES
PRINT CNTR2 AS CNTR CATY AS CATEGORY DATEY AS DATE CITYY AS CITY
IF RECORDLIMIT EQ &PGS
ON TABLE HOLD AS HOLD2
END
-RUN
-*
-*Get report detail lines
TABLE FILE GGSALES
PRINT CNTR5 AS CNTR CATEGORY DATE CITY
ON TABLE HOLD AS HOLD3
END
-RUN
-*
-*Merge files
TABLE FILE HOLD1
PRINT *
ON TABLE HOLD AS HOLD4
MORE
FILE HOLD2
MORE
FILE HOLD3
END
-RUN
-*
-*Dynamic title values
-SET &T1 = 'THIS';
-SET &T2 = 'IS';
-SET &T3 = 'AN';
-SET &T4 = 'ATTEMPT';
-SET &T5 = 'AT';
-SET &T6 = 'MORE';
-SET &T7 = 'THAN';
-SET &T8 = 'FIVE';
-SET &T9 = 'LINES';
-SET &T10 = 'IN';
-SET &T11 = 'A';
-SET &T12 = 'TITLE';
-SET &T13 = 'CATEGORY';
-SET &T14 = 'DATE';
-SET &T15 = 'CITY';
-*
DEFINE FILE HOLD4
DUM/A1      = '';
CTR/I3      = IF CTR GE &NUM_LINES THEN 1 ELSE CTR + 1;
CRLF/A2     = HEXBYT(13,'A1') | HEXBYT(10,'A1');
DATE/A8YYMD = EDIT(DATE);
CRLF1/A100  = IF CITY EQ 'X' THEN '&T1'||CRLF||'&T2'|CRLF||'&T3'||CRLF||'&T4'||CRLF||'&T5'||CRLF||'&T6'||CRLF||'&T7'||CRLF||'&T8'||CRLF||'&T9'||CRLF||'&T10'||CRLF||'&T11'||CRLF||'&T12'||CRLF||'&T13' ELSE
              IF CITY EQ 'Y' THEN '----------' ELSE CATEGORY;
CRLF2/A100  = IF CITY EQ 'X' THEN '&T1'||CRLF||'&T2'|CRLF||'&T3'||CRLF||'&T4'||CRLF||'&T5'||CRLF||'&T6'||CRLF||'&T7'||CRLF||'&T8'||CRLF||'&T9'||CRLF||'&T10'||CRLF||'&T11'||CRLF||'&T12'||CRLF||'&T14' ELSE
              IF CITY EQ 'Y' THEN '----------' ELSE DATE;
CRLF3/A100  = IF CITY EQ 'X' THEN '&T1'||CRLF||'&T2'|CRLF||'&T3'||CRLF||'&T4'||CRLF||'&T5'||CRLF||'&T6'||CRLF||'&T7'||CRLF||'&T8'||CRLF||'&T9'||CRLF||'&T10'||CRLF||'&T11'||CRLF||'&T12'||CRLF||'&T15' ELSE
              IF CITY EQ 'Y' THEN '-------------' ELSE CITY;
END
-*
-*Sort by CNTR5 to get in proper order (title text row, dashes row, detail row)
TABLE FILE HOLD4
PRINT CRLF1 AS '' 
      CRLF2 AS ''  
      CRLF3 AS ''
BY DUM NOPRINT PAGE-BREAK WHEN CTR EQ &NUM_LINES
BY CNTR NOPRINT
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
ORIENTATION=LANDSCAPE,$
TYPE=REPORT,LINEBREAK='CRLF',$
TYPE=REPORT,SQUEEZE=1.5,$
ENDSTYLE
END
-RUN



WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
 
Posts: 84 | Registered: December 13, 2005Report This Post
Platinum Member
posted Hide Post
Waz, I am working on 7.6.10. So, njsden’s solution won’t work for me.

I did test with PARAG function. However, it is not consistent. Particularly when there are words longer than the subsize. In the following example, the title word, THIS_IS_ONE_LONG, is 16 characters in length. In PARAG I am setting subsize to 15 characters. PARAG replaces the 16th character with comma. Therefore the title becomes THIS_IS_ONE_LON. This is wrong.


-SET &ECHO = 'ALL';
-*
CHECK FILE CAR HOLD AS HFLDS
-*
DEFINE FILE HFLDS
TITLE_NEW/A50 = DECODE FIELDNAME('CAR' 'THIS_IS_ONE_LONG TITLE', 'MODEL' 'THIS_IS_TITLE_FOR MODEL' );
LEN/I4 = ARGLEN(50, TITLE_NEW, LEN);
TITLE1/A50 = PARAG(LEN, TITLE_NEW, ',', 15, TITLE1);
END
-RUN
-*
TABLE FILE HFLDS
PRINT
FIELDNAME
TITLE1
WHERE FIELDNAME IN ('CAR','MODEL')
ON TABLE HOLD AS HRPT
END
-RUN
-*
-SET &STR = '';
-REPEAT :L1 2 TIMES
-READ HRPT &FIELD.A66 &TITLE.A50.
-SET &FIELD = LJUST(66, '&FIELD.EVAL', 'A66');
-SET &FIELD = TRUNCATE ('&FIELD.EVAL');
-SET &TITLE = LJUST(50, '&TITLE.EVAL', 'A50');
-SET &TITLE = TRUNCATE ('&TITLE.EVAL');
-SET &STR = &STR | '&FIELD.EVAL AS ''&TITLE.EVAL'' ';
-:L1
-RUN
-*
TABLE FILE CAR
PRINT
&STR.EVAL
BY COUNTRY
ON TABLE PCHOLD FORMAT PDF
END

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


WebFOCUS 8207.11
App Studio 8207
 
Posts: 146 | Registered: January 06, 2009Report 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     Milti-Line Title in PDF Format

Copyright © 1996-2020 Information Builders