Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Line-wrapped data field with horizontal lines?(Got data of varied length which will wrap inside a box. Want a line for each row, whether printed in or not, so can handwrite on if needed)
Line-wrapped data field with horizontal lines? [message #866792] Tue, 01 May 2012 02:20 Go to next message
Brad Mising name is currently offline Brad Mising nameFriend
Messages: 21
Registered: September 2009
Junior Member
I have a single-record one page report that has a 'details' box. This box is about 10 lines high, enough space to cope with possible entered values. When generating the report, the content will line wrap to fill up as many lines of the box as needed. Pretty standard.

But this box may get added to once report is printed to paper. I want to have ruled lines under each printed line of text, and evenly spaced all the way to the bottom of the box so that there's space for users to hand write additional 'details' into the box.

Happy to change the field to whatever needed, eg Text, Dynamic Text, even Table if I have to.

Any help appreciated
Thanks
Brad
Re: Line-wrapped data field with horizontal lines? [message #867941 is a reply to message #866792] Tue, 01 May 2012 15:03 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Brad,

What are you using currently, a data item?

Jason

On 4/30/2012 10:20 PM, Brad Mising name wrote:
> I have a single-record one page report that has a 'details' box. This
> box is about 10 lines high, enough space to cope with possible entered
> values. When generating the report, the content will line wrap to fill
> up as many lines of the box as needed. Pretty standard.
>
> But this box may get added to once report is printed to paper. I want to
> have ruled lines under each printed line of text, and evenly spaced all
> the way to the bottom of the box so that there's space for users to hand
> write additional 'details' into the box.
>
> Happy to change the field to whatever needed, eg Text, Dynamic Text,
> even Table if I have to.
>
> Any help appreciated
> Thanks
> Brad
Re: Line-wrapped data field with horizontal lines? [message #868354 is a reply to message #867941] Tue, 01 May 2012 19:25 Go to previous messageGo to next message
Brad Mising name is currently offline Brad Mising nameFriend
Messages: 21
Registered: September 2009
Junior Member
Hi Jason

Not really using anything just now. Tried a series of different options but couldn't see any obvious solution with any of them. I started with a a data item though, yes.

To be explicit, I've attached an image mockup of the kind of thing I'm trying to achieve. It shows faint grey dashed lines, not right to the edges, but if it can only be solid black lines right across, that's OK as a compromise.

Thanks
Brad
Re: Line-wrapped data field with horizontal lines? [message #869663 is a reply to message #868354] Tue, 01 May 2012 21:29 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Brad,

There may be a better way to do this but you could use a background
image of lined paper on a grid cell and put your data item in the grid
cell. Look at the middle column in the attached example. Look at the
advanced properties for the cell, under background. Put the image in
the images directory. Another option would be to use two data items,
one with underline text style that would contain your string. Use the
second one to display empty lines. The example does not have it but you
could then script the second one to contain string with ___ for the
number of characters remaining. If you do this remember to put spaces
in so the word wrap will happen.

Jason

On 5/1/2012 3:25 PM, Brad Mising name wrote:
> Hi Jason
>
> Not really using anything just now. Tried a series of different options but couldn't see any obvious solution with any of them. I started with a a data item though, yes.
>
> To be explicit, I've attached an image mockup of the kind of thing I'm trying to achieve. It shows faint grey dashed lines, not right to the edges, but if it can only be solid black lines right across, that's OK as a compromise.
>
> Thanks
> Brad
  • Attachment: bglines.zip
    (Size: 1.83KB, Downloaded 146 times)
Re: Line-wrapped data field with horizontal lines? [message #869668 is a reply to message #868354] Tue, 01 May 2012 21:29 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Brad,

There may be a better way to do this but you could use a background
image of lined paper on a grid cell and put your data item in the grid
cell. Look at the middle column in the attached example. Look at the
advanced properties for the cell, under background. Put the image in
the images directory. Another option would be to use two data items,
one with underline text style that would contain your string. Use the
second one to display empty lines. The example does not have it but you
could then script the second one to contain string with ___ for the
number of characters remaining. If you do this remember to put spaces
in so the word wrap will happen.

Jason

On 5/1/2012 3:25 PM, Brad Mising name wrote:
> Hi Jason
>
> Not really using anything just now. Tried a series of different options but couldn't see any obvious solution with any of them. I started with a a data item though, yes.
>
> To be explicit, I've attached an image mockup of the kind of thing I'm trying to achieve. It shows faint grey dashed lines, not right to the edges, but if it can only be solid black lines right across, that's OK as a compromise.
>
> Thanks
> Brad
  • Attachment: bglines.zip
    (Size: 1.83KB, Downloaded 128 times)
Re: Line-wrapped data field with horizontal lines? [message #869704 is a reply to message #869668] Thu, 03 May 2012 22:28 Go to previous messageGo to next message
Brad Mising name is currently offline Brad Mising nameFriend
Messages: 21
Registered: September 2009
Junior Member
Hi Jason

Thanks and yikes. I was hoping not to have to go this route, but I appreciate your confirmation.

Similar to what you suggested, my next preferred approach was to produce an image 1 px high, which is simply a line (or dotted). Then set this as background and set the Y Repeat spacing to '1 ex' - ie the font's height. This was a no-go however, when I realised that Y-repeat spacing isn't configurable.

So I settled on a single line, with fixed white above it. When repeated this gave consistent lines down the box. It was then a matter of setting the Text: Line Height to fixed mm value that lined up properly with the background (a lot of trial and error).

FWIW I've attached the png I ended up with - a grey dotted line. My line height was 5.6mm.

Thanks
Brad
  • Attachment: line10.png
    (Size: 0.15KB, Downloaded 206 times)
Re: Line-wrapped data field with horizontal lines? [message #869719 is a reply to message #869704] Fri, 04 May 2012 01:03 Go to previous messageGo to next message
Brad Mising name is currently offline Brad Mising nameFriend
Messages: 21
Registered: September 2009
Junior Member
I actually found in the end that Adobe Reader wasn't coping with the X and Y repeating - it was really slow to render onscreen during scrolling.

I ended up making the line image much wider so repeat mode could be just 'Repeat Y'. New image attached for posterity

Brad
Re: Line-wrapped data field with horizontal lines? [message #869868 is a reply to message #869719] Fri, 04 May 2012 14:57 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Brad

Thanks for the update.

Jason

On 5/3/2012 9:03 PM, Brad Mising name wrote:
> I actually found in the end that Adobe Reader wasn't coping with the X and Y repeating - it was really slow to render onscreen during scrolling.
>
> I ended up making the line image much wider so repeat mode could be just 'Repeat Y'. New image attached for posterity
>
> Brad
Previous Topic:dataset filter in subreports
Next Topic:How to create user in birt
Goto Forum:
  


Current Time: Sat Apr 20 00:35:00 GMT 2024

Powered by FUDForum. Page generated in 0.04299 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top