Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: How do I force underline to a specific width ?  (Read 13040 times)
Newdecision T.
Posts: 12


« on: July 29, 2009, 02:41:48 pm »

In Genero Report Writer how do i specify the width of a column with the underline attribute ?

I want to do something like this:

    Code                      Description
    ---------------------   ------------------------------------------------------------------------------------
    123456789012345   123456789012345123456789012345123456789012345123456789012345


I am using a fixed width font (Courier New) and I did set the with of the "Code" and "Description" text boxes to the maximum size (15 and 60) but the underline is allways "short" (see atached screen capture "screen_capture_0001.jpg").



Vitorino Ribeiro
SINFIC - Sistemas de Informação Industriais e Consultoria, S.A.
http://www.sinfic.pt
vribeiro@sinfic.pt

Versions used:

Server:
    Red Hat Enterprise Linux ES release 4 (Nahant Update 8 ) (arch: x86_64) (64 bits)
    Genero BDL 2.20.06
    Genero Report Writer 1.00.16

    Java:
      java version "1.6.0_14"
      Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
      Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)

Client:
    Microsoft Windows XP Professional (Service Pack 3) (arch: x86) (32 bits)
    Genero Desktop Client 2.20.13
    Genero Report Designer 1.00.06-69057



Vitorino Ribeiro
SINFIC - Sistemas de Informação Industriais e Consultoria, S.A.
http://www.sinfic.pt
vribeiro@sinfic.pt


* screen_capture_0001.JPG (5.68 KB, 519x60 - viewed 2561 times.)
Alex G.
Four Js
Posts: 155


« Reply #1 on: July 30, 2009, 08:45:39 pm »

Don't use underline because the size of a space can change from font to font. Instead try the following:

<LAYOUTNODE x-size="min" y-size="min">
    <WORDBOX text="Code"/>
    <LAYOUTNODE bgColor="black" x-size='width("0")*15' y-size="1point"/>
</LAYOUTNODE>

The expression width("0")*15 works because all digits have the same size also in proportional fonts. You could of course have written width("123456789012345") instead.

Newdecision T.
Posts: 12


« Reply #2 on: July 31, 2009, 10:56:35 am »

To try your suggestion:

<LAYOUTNODE x-size="min" y-size="min">
    <WORDBOX text="Code"/>
    <LAYOUTNODE bgColor="black" x-size='width("0")*15' y-size="1point"/>
</LAYOUTNODE>

--> Do I have to manually edit the ".4rp" file or is there a way to do it in the GUI (in the Genero Report Designer) ?



Vitorino Ribeiro
SINFIC - Sistemas de Informação Industriais e Consultoria, S.A.
http://www.sinfic.pt
vribeiro@sinfic.pt
Alex G.
Four Js
Posts: 155


« Reply #3 on: July 31, 2009, 11:18:24 am »

Yes you could do that but that is not how I meant it :-). You need to translate the XML into designer actions. I write it this way because I think it is shorter then explaining the steps in the designer. The XML translates into the following instructions:

- Drag a LayoutNode from the toolbox into the report.
- Set the name of this node to "l1"
- Drag a WordBox from the toolbox into "l1" while holding down the control key.
- Set the "text" property of this WordBox to "ZIP Code"
- Drag a LayoutNode from the toolbox into the structure view and drop it on top of the element "l1" (You should see a rectangle around the element "l1" before the drop).
- Set the background color of this new node to black.
- Set the x-size value of this new node to "width(0)*15
- set the y-size value to this new node to "1point"
 
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines