Focal Point
[CLOSED] PDF wrap and Alignment Issue

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

May 05, 2009, 03:28 AM
Srinivasan_Munuswamy
[CLOSED] PDF wrap and Alignment Issue
Hi All,
I have a report where I need to show multiple columns one below the other and their alignment should be proper. I have written the code using CAR.
In that report some of the report values gets wrapped some or not.
I would like to know why the wrapping is not consistent within a report.Let me know if I have made any mistake in that report.

If you execute the below code u can see that "W Germany" gets wrapped while the other values at the top of the report gets cut off. I dont know why is it happening although i have applied wrap to the field as a whole.

here goes the code using car:

DEFINE FILE CAR
COMBI/A500=COUNTRY||CAR||MODEL||BODYTYPE ;
END

TABLE FILE CAR
PRINT
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
BY COMBI NOPRINT

HEADING
"COL1<+0>COL2"
ON COMBI SUBHEAD
" test"
" test"

ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *


TYPE=HEADING, LINE=1,ITEM=1, OBJECT=TEXT, POSITION=P1,WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1, $
TYPE=HEADING, LINE=1,ITEM=2, WIDTH=1.25,POSITION=P3,JUSTIFY=RIGHT,WRAP=1, $

TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=1,OBJECT=FIELD,JUSTIFY=LEFT,WRAP=0.5, $
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=1, OBJECT=FIELD, JUSTIFY=LEFT,WRAP=0.5, $

TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=2, OBJECT=FIELD, JUSTIFY=LEFT,WRAP=0.5,$
TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=2,OBJECT=FIELD, JUSTIFY=LEFT,WRAP=0.5,$

TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=3, WIDTH=1.5, JUSTIFY=LEFT,WRAP=0.5, $
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=3, WIDTH=1.5, JUSTIFY=LEFT,WRAP=0.5,$
ENDSTYLE
END

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


WF 8.0.0.9 Database : oracle

CURRENT:
WebFOCUS 8.0.0.9 /oracle 11 i

May 05, 2009, 07:48 AM
<JG>
The code you've posted does not actually output anything except the following

 COL1 COL2
TEST
TEST
TEST
TEST
TEST
TEST 


so it's impossible to see what the problem is
May 06, 2009, 12:52 AM
Srinivasan_Munuswamy
Hi JG,

I made a mistake by not posting the code within
[code]
tags, because of which the field references have been treated as html tags and they got missed.

Here goes the code. Waiting for your reply

 
SET PRINTPLUS=ON;
DEFINE FILE CAR
COMBI/A500=COUNTRY||CAR||MODEL||BODYTYPE ;
END
TABLE FILE CAR
PRINT
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
BY COMBI NOPRINT
HEADING
"COL1<+0>COL2"
ON COMBI SUBHEAD
"<COUNTRY<+0> <MODEL<+0>   test"
"<CAR<+0> <BODYTYPE<+0>   test"
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=HEADING, LINE=1,ITEM=1, OBJECT=TEXT,  POSITION=P1,WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1, $
TYPE=HEADING, LINE=1,ITEM=2, WIDTH=1.25,POSITION=P3,JUSTIFY=RIGHT,WRAP=1, $
TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=1,OBJECT=FIELD,JUSTIFY=RIGHT,WRAP=0.5, $
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=1, OBJECT=FIELD, JUSTIFY=RIGHT,WRAP=0.5, $
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=2, OBJECT=FIELD,  JUSTIFY=RIGHT,WRAP=0.5,$
TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=2,OBJECT=FIELD, JUSTIFY=RIGHT,WRAP=0.5,$
TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=3, WIDTH=1.5, JUSTIFY=RIGHT,WRAP=0.5, $
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=3, WIDTH=1.5, JUSTIFY=RIGHT,WRAP=0.5,$
ENDSTYLE
END


 

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


WF 8.0.0.9 Database : oracle

CURRENT:
WebFOCUS 8.0.0.9 /oracle 11 i

May 06, 2009, 03:37 AM
GamP
Hm, my settings seem to result in all columns wrapping ... also using your code this happens.
And I ran it with the same webfocus release you indicated in your post - 762.
And actually that makes sense, because for every part you specify a WRAP=, so it should wrap and not truncate.
At this moment I don't know what causes the truncate in your case.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
May 06, 2009, 08:13 AM
RSquared
Try this code.
/*
SET PRINTPLUS=ON;
DEFINE FILE CAR
COMBI/A500=COUNTRY||CAR||MODEL||BODYTYPE ;
END
TABLE FILE CAR
PRINT
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
BY COMBI NOPRINT
HEADING
"COL1<+0> COL2"
ON COMBI SUBHEAD
" test"
" test"
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=HEADING, LINE=1,ITEM=1, OBJECT=TEXT, JUSTIFY=LEFT,WRAP=1.0, $
TYPE=HEADING, LINE=1,ITEM=2, JUSTIFY=LEFT,WRAP=1.0, $
TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=1,OBJECT=FIELD,JUSTIFY=LEFT,WRAP=1.0, $
TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=2, OBJECT=FIELD, JUSTIFY=LEFT,WRAP=1.0, $
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=1, OBJECT=FIELD, JUSTIFY=LEFT,WRAP=1.0,$
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=2, OBJECT=FIELD, JUSTIFY=LEFT,WRAP=1.0,$
TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=3, JUSTIFY=LEFT,WRAP=1.0, $
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=3, JUSTIFY=LEFT,WRAP=1.0,$
ENDSTYLE
END
/*


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
May 06, 2009, 11:07 AM
j.gross
rr: Add CODE tags please.

sm: With the code below I get wrapping on all the fields imbedded in the subhead.
SET PRINTPLUS=ON
DEFINE FILE CAR
COMBI/A65=COUNTRY||'.'||CAR||'.'||MODEL||'.'||BODYTYPE ;
END
TABLE FILE CAR
WRITE COMBI AS 'COMBI-1'
BY COMBI AS 'COMBI-2' FOLD-LINE NOSPLIT
ON COMBI SUBHEAD
"<COUNTRY><+0><MODEL>"
"<CAR><+0><BODYTYPE>"
" "
ON COMBI SUBFOOT
"-----------------------------------------------------------"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
  TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=1,OBJECT=FIELD,JUSTIFY=LEFT,WRAP=0.5,COLOR= RED,$
  TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=2,OBJECT=FIELD,JUSTIFY=LEFT,WRAP=0.5,COLOR= BLUE,$

  TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=1,OBJECT=FIELD,JUSTIFY=LEFT,WRAP=0.5,COLOR= GREEN,$
  TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=2,OBJECT=FIELD,JUSTIFY=LEFT,WRAP=0.5,COLOR=FIREBRICK,$
ENDSTYLE
END

Note that W Germany breaks 'cleanly' on the space in position 2; whereas england has no place to break other than in in midword, given that WRAP=0.5 leaves room for only 5 characters. Similarly for ALFA ROMEO and JAGUAR.

I think your original code had reference problems: since your subhead
"<COUNTRY<+0> <MODEL<+0>   test"
"<CAR<+0> <BODYTYPE<+0>   test"

included a space after the <+0>, that space became the #2 object in each line, and the tags to embed Model in line 1 and Bodytype in line 2 became #3, for which you did not specify wrapping..

In my code's output there is an oddity, apparently reflecting a bug in WF:
Page 1 is fine, but starting with page 2 I get duplication of data:
On page 2, Model is rendered twice in the first subhead line -- first properly (with wrapping and in the specified color), and following that it is repeated -- with the wrong color (matching the first field's style) and without wrapping.
On pages 3 and 4, the same thing happens, but to line two.


- Jack Gross
WF through 8.1.05
May 06, 2009, 01:32 PM
RSquared
JG,

What are the code tags that you are lookin for ?

RR


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
May 06, 2009, 04:18 PM
j.gross
quote:
What are the code tags that you are lookin for ?

Use this: < / > on the menu bar.
May 07, 2009, 01:33 AM
Srinivasan_Munuswamy
Hi JG and Rsquared,
I tried the code you have given, but still i could see wrapping not appearing properly(consistently).


For JG's code:

I could see the wrapping of first row in page1,
but 2nd,3rd ,4th row i.e jaguar and jense,england getting cut off in page1 itself.
I dont know why it is inconsistent , forsome rows wrapping happens for some not. Please help me.

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


WF 8.0.0.9 Database : oracle

CURRENT:
WebFOCUS 8.0.0.9 /oracle 11 i

May 07, 2009, 08:44 AM
RSquared
Try this.
 
SET PRINTPLUS=ON;
DEFINE FILE CAR
COMBI/A500=COUNTRY||CAR||MODEL||BODYTYPE ;
END
TABLE FILE CAR
PRINT
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
COMPUTE C3/A3=' '; AS ''
BY COMBI NOPRINT
HEADING
"COL1<+0>COL2"
ON COMBI SUBHEAD
"<COUNTRY<+0> <MODEL<+0>   test"
"<CAR<+0> <BODYTYPE<+0>   test"
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=HEADING, LINE=1,ITEM=1, OBJECT=TEXT,  POSITION=P1,  JUSTIFY=RIGHT,WRAP=1, $
TYPE=HEADING, LINE=1,ITEM=2,  POSITION=P3,JUSTIFY=RIGHT,WRAP=1, $
TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=1,OBJECT=FIELD,JUSTIFY=RIGHT,WRAP=0.5, $
TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=2,OBJECT=FIELD, JUSTIFY=RIGHT,WRAP=0.5,$
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=1, OBJECT=FIELD, JUSTIFY=RIGHT,WRAP=0.5, $
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=2, OBJECT=FIELD,  JUSTIFY=RIGHT,WRAP=0.5,$
TYPE=SUBHEAD, BY=COMBI,LINE=1,ITEM=3, JUSTIFY=RIGHT,WRAP=0.5, $
TYPE=SUBHEAD, BY=COMBI,LINE=2,ITEM=3, JUSTIFY=RIGHT,WRAP=0.5,$
ENDSTYLE
END
 

JG,

Are the tags OK now ?

RR


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
May 08, 2009, 03:52 AM
Srinivasan_Munuswamy
No Luck Rsquared,

Still the problem persists, for some values wrapping happens for some values it is not.


I feel there is a bug in WF. What you say?

Thanks & Regards,
Srinivasan M


WF 8.0.0.9 Database : oracle

CURRENT:
WebFOCUS 8.0.0.9 /oracle 11 i

May 08, 2009, 05:06 AM
<JG>
How many of you guys have they got working on this problem.

Make your stylesheet as light as possible.

As as per my comments to Jan1

You cannot fit a meter into a yard. Either increase the column width or reduce the font size.

Which version are you running in your 7.1.4 environment or your 7.6.2

This was a known issue before 7.3

 ON TABLE SET STYLE *
TYPE=HEADING, LINE=1,ITEM=1, OBJECT=TEXT,  POSITION=P1,  JUSTIFY=RIGHT,WRAP=1, $
TYPE=HEADING, LINE=1,ITEM=2,  POSITION=P3,JUSTIFY=RIGHT,WRAP=1, $
TYPE=SUBHEAD,SIZE=6,$
TYPE=SUBHEAD, WRAP=0.5, $
ENDSTYLE 

May 08, 2009, 05:51 AM
Srinivasan_Munuswamy
Hi JG,
I work with 7.1.4 now.
The issue I am facing is in 7.1.4 version.

It is not that we are trying to fit a meter into a yard.
We have many columns to be shown in a single report and we can only increase the width of a column to an extent.

we cannot have a report to show only one column in each and increase the width so that the data fits properly.
Also if wrapping functionality is available with WF it should be applying the style consistently and not like the screen shots shown above.

The users cannot compromise on the font size like 1 or 2 so that we can show a huge description.

Srini


WF 8.0.0.9 Database : oracle

CURRENT:
WebFOCUS 8.0.0.9 /oracle 11 i

May 08, 2009, 06:17 AM
<JG>
quote:
This was a known issue before 7.3

Every software has bugs, IBI is just like everyone else.

Try testing in you 7.6.2 environment and see if it is resolved there. I suspect is.

Then you have 2 options, either upgrade or open a case with IBI to see if they will back port the fix.
7.1.4 is currently on hotfix 22 and the issue is not reported as being fixed.

Fixes included in 7.1.4 Hotfix 22