Focal Point
[SOLVED] right justify leader line in heading

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

April 06, 2016, 11:29 AM
Deana
[SOLVED] right justify leader line in heading
Good morning,

I have the following code in a heading
"This is the text for row 1 ________ <76 1"
"Text for row 2 ____________________ <76 2"

Since the font is not monospaced, I cannot get the end of the _______ to line up between row 1 and row 2. In Word, there is a leader tab that will allow you to add the ____ to the tab and therefore right align all ____ for all rows. Is there a way to accomplish this in WebFOCUS.

I have tried various style settings including

TYPE=HEADING, LINE=1, ITEM=2, JUSTIFY=RIGHT, WIDTH=10, $

Thank you,
Deana

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


WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively;
excel, html, pdf
April 06, 2016, 01:37 PM
MartinY
Once a Style sheet is applied, you can use "Alignment Grid" option.

Right Header/Footer section and select "Alignment Grid..."


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
April 06, 2016, 01:52 PM
RSquared
Try this
HEADING
"This is the text for row 1<+0> ________ <76 1"
"Text for row 2 <+0> ________ <76 2"

TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=2, POSITION=3.1500,$
TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=2, POSITION=3.9500,$


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
April 06, 2016, 04:13 PM
Deana
Thank you for your assistance.

MartinY, Using the painter, I created a test fex and used the alignment grid. I still had problems getting the ____ to right align. I was able to drag the right side of the second item in each row individually. Then I had to change the source code to get the each row to align with the next. I usually use notepad to create and edit most of my reports, so this was not an issue.

RSquared, POSITION was a good starting point. Even after manipulating the starting point for each row, the right side of the lines still did not line up.

In the end, I combined WIDTH, JUSTIFY, and POSITION and modified the number of '_' entered to get closer. Some of the lines are off by ~1 mm, but probably won't be noticed by most people unless they are looking for the differences specifically.

I also replaced <76 with styles setting the POSITION and JUSTIFY attributes for the last object in each line. This makes sure that -2, 1, 10, 20, 200, etc are all right aligned.

The final product looks much better than earlier today. Thanks for your assistance.

Here is my final solution:

"This is the text for row 1<+0>________<+0>1"
"Text for row 2 <+0>____________<+0>2"


TYPE=HEADING, LINE=1, ITEM=2, POSITION=3.5000, WIDTH=3.3000, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=1, ITEM=3, POSITION=7.7500, WIDTH=0.2500, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=2, ITEM=2, POSITION=6.4500, WIDTH=0.3500, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=2, ITEM=3, POSITION=7.7500, WIDTH=0.2500, JUSTIFY=RIGHT, $


WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively;
excel, html, pdf