Skip to main content



      Home
Home » Archived » BIRT » Ability to set the width in a cell via scripting?
Ability to set the width in a cell via scripting? [message #107698] Wed, 11 January 2006 15:59 Go to next message
Eclipse UserFriend
I looked at the BIRT
FAQ(http://www.eclipse.org/birt/wiki/index.php?n=FAQ.Scripting) and
it states the following:

Q: Is it possible to use cell.setProperty( ) to set the width of
cells?
Answered by Stanley Wang
You can not set column width dynamically for now. Runtime scripting is
limited to property access and data-manipulations for this release.
More will come in BIRT 2.0.


So I'm wondering if it's possible to change the width of a cell using
runtime scripting in BIRT 2.0? The effect I want to achieve is to
provide a percentage scale within a table. By changing the width of a
cell dynamically. I think this would be pretty cool.

I also want to have the ability to change the source url for an image
using scripting.
Re: Ability to set the width in a cell via scripting? [message #107871 is a reply to message #107698] Wed, 11 January 2006 19:48 Go to previous messageGo to next message
Eclipse UserFriend
As it stands right now you can't set the width of a cell. You can maybe
achieve what you want using margin, border or padding.
To set the padding on the right side, you could do something like this in
onCreate for the Cell:
this.style.paddingRight = "10cm";

Methods of interest to you could be:
this.style.paddingRight/Left/Top/Bottom,
this.style.marginRight etc,
this.style.borderRightStyle etc,
this.style.borderRightWidth etc,
this.style.borderRightColor etc,
this.style.lineHeight
etc...

You might consider filing a bug report on the lack of support for
manipulating the width of a cell using scripting.

As for changing the source url for an image, you can do the following in
onCreate for the image:
this.URI = "someURI";

Hope this helps.

/Petter Ivmark

<sleeloy@ca.ibm.com> wrote in message
news:2vras1hvsudo79hiipkeak13vqh3u2v778@4ax.com...
>I looked at the BIRT
> FAQ(http://www.eclipse.org/birt/wiki/index.php?n=FAQ.Scripting) and
> it states the following:
>
> Q: Is it possible to use cell.setProperty( ) to set the width of
> cells?
> Answered by Stanley Wang
> You can not set column width dynamically for now. Runtime scripting is
> limited to property access and data-manipulations for this release.
> More will come in BIRT 2.0.
>
>
> So I'm wondering if it's possible to change the width of a cell using
> runtime scripting in BIRT 2.0? The effect I want to achieve is to
> provide a percentage scale within a table. By changing the width of a
> cell dynamically. I think this would be pretty cool.
>
> I also want to have the ability to change the source url for an image
> using scripting.
>
Re: Ability to set the width in a cell via scripting? [message #108732 is a reply to message #107871] Thu, 12 January 2006 16:11 Go to previous message
Eclipse UserFriend
Thanks Petter,

I was able to achieve what I want.
I also added a bugzilla entry to add support for setting widths on
report items.

https://www.eclipse.org/bugs/show_bug.cgi?id=123664

On Wed, 11 Jan 2006 16:48:01 -0800, "Petter Ivmark"
<pivmark@actuate.com> wrote:

>As it stands right now you can't set the width of a cell. You can maybe
>achieve what you want using margin, border or padding.
>To set the padding on the right side, you could do something like this in
>onCreate for the Cell:
>this.style.paddingRight = "10cm";
>
>Methods of interest to you could be:
>this.style.paddingRight/Left/Top/Bottom,
>this.style.marginRight etc,
>this.style.borderRightStyle etc,
>this.style.borderRightWidth etc,
>this.style.borderRightColor etc,
>this.style.lineHeight
>etc...
>
>You might consider filing a bug report on the lack of support for
>manipulating the width of a cell using scripting.
>
>As for changing the source url for an image, you can do the following in
>onCreate for the image:
>this.URI = "someURI";
>
>Hope this helps.
>
>/Petter Ivmark
>
><sleeloy@ca.ibm.com> wrote in message
>news:2vras1hvsudo79hiipkeak13vqh3u2v778@4ax.com...
>>I looked at the BIRT
>> FAQ(http://www.eclipse.org/birt/wiki/index.php?n=FAQ.Scripting) and
>> it states the following:
>>
>> Q: Is it possible to use cell.setProperty( ) to set the width of
>> cells?
>> Answered by Stanley Wang
>> You can not set column width dynamically for now. Runtime scripting is
>> limited to property access and data-manipulations for this release.
>> More will come in BIRT 2.0.
>>
>>
>> So I'm wondering if it's possible to change the width of a cell using
>> runtime scripting in BIRT 2.0? The effect I want to achieve is to
>> provide a percentage scale within a table. By changing the width of a
>> cell dynamically. I think this would be pretty cool.
>>
>> I also want to have the ability to change the source url for an image
>> using scripting.
>>
>
Previous Topic:Passing a parameter to an ORDER BY clause
Next Topic:IF statement in SQL query or also possible in BIRT report?
Goto Forum:
  


Current Time: Tue Jun 10 11:19:30 EDT 2025

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

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

Back to the top