Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » fill dynamic textfield with "..."-dots
fill dynamic textfield with "..."-dots [message #921874] Mon, 24 September 2012 14:05 Go to next message
hage Mising name is currently offline hage Mising nameFriend
Messages: 67
Registered: September 2011
Member
Hi,

in my report there is a grid with two colums, each containig a dynamicText-element. Left column is left-aligned, right-column is right aligned, strings displayed have different lengths. is it possible to add to the strings some kind of padding ( variable amount of "."-chars) so that all whitespace (in both columns) is filled with that dots(and user is lead while reading from left to right side, like you see it in a table of contents in a book or something like that)

to illustrate what i want to do:
a.....|.....1
bc....|....22
cde...|...333


(in other words: how can i access the length of the textcontaining element (and the length the data string will take) in the onrender-script(or other) and attach that many '.' that it is exactly filled up)

thx in advance,

hage
Re: fill dynamic textfield with "..."-dots [message #922213 is a reply to message #921874] Mon, 24 September 2012 21:02 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Do you mean like the attached example?

Jason
Re: fill dynamic textfield with "..."-dots [message #922665 is a reply to message #922213] Tue, 25 September 2012 08:07 Go to previous messageGo to next message
hage Mising name is currently offline hage Mising nameFriend
Messages: 67
Registered: September 2011
Member
Thx for your reply jason,

thats the way i want it to behave, but without that hardcoded 6. strings could be of any length, so the amount of '.' should be dependent on the length of the data string AND the length (horizontal size) of the dynamic text field, or i use an dynamic text field with a string like:
row[leftSide] + dots + row[rightSide]

in both cases i need to know the size of of the (rendered) textfield, to get the need amount of dots to fill up the textfield. is that somehow possible?
Re: fill dynamic textfield with "..."-dots [message #923131 is a reply to message #922665] Tue, 25 September 2012 16:22 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Take a look at the revised example. It has a table with a couple of added computed columns and aggregated columns. Then look at the onRender scripts.

Jason
Re: fill dynamic textfield with "..."-dots [message #923132 is a reply to message #923131] Tue, 25 September 2012 16:24 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Also if you know the max string length you could probably could just use the FormatString property for the data items.

Jason
Re: fill dynamic textfield with "..."-dots [message #923933 is a reply to message #923132] Wed, 26 September 2012 10:17 Go to previous messageGo to next message
hage Mising name is currently offline hage Mising nameFriend
Messages: 67
Registered: September 2011
Member
Thx Jason, currently your script produces strings which lengths are all equal depending on the longest of them (before getting changed by script). that's a first step, but not what i want it to. e.g. the string containing element (dynamictextfield in a tablecell) spans whole the page (from left to right side), but the string only is 4 charachters long, i want the string to be as long as the containing element, so whole the element (dynamic textfield) is filled with my padding char ('.') behind the original string.
Re: fill dynamic textfield with "..."-dots [message #924404 is a reply to message #923933] Wed, 26 September 2012 20:27 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Unless you set the size in the designer, I do not know of a way to do this.

Jason
Previous Topic:folder for the list of reports
Next Topic:Script: Accessing specific cross-tab cell data
Goto Forum:
  


Current Time: Tue Apr 23 11:36:15 GMT 2024

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

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

Back to the top