Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Absolute position in report via API
Absolute position in report via API [message #815098] Wed, 07 March 2012 08:25 Go to next message
Chris K is currently offline Chris KFriend
Messages: 18
Registered: February 2012
Junior Member
Hi all!

I unsuccessfully searched the forums in order to make the following concept work:

I must arrange basic elements like labels and images in a report via api in order to be positioned absolutely. I stumbled upon the FreeFormHandle, but it seems like
A. I am using it wrong or
B. Absolute position is not possible at all.

FreeFormHandle free = factory.newFreeForm(null);
free.setWidth(400 + "pt");
free.setHeight(400 + "pt");
free.setX(100 + "pt");
free.setY(150 + "pt");
LabelHandle labeltest = factory.newLabel(null);
labeltest.setText("Hello World");
free.addElement(labeltest, 0);
design.getBody().add(free);


I would appreciate any help!

Thanks
chris
Re: Absolute position in report via API [message #815568 is a reply to message #815098] Wed, 07 March 2012 20:31 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

The FreeForm report item has not been completed yet. I believe code is
in for writing out to the design, but not generating anything with it yet.

If you are using fixed layout, can you not just use a grid and and set
column and row height and widths?

Jason

On 3/7/2012 3:25 AM, Chris K wrote:
> Hi all!
>
> I unsuccessfully searched the forums in order to make the following
> concept work:
>
> I must arrange basic elements like labels and images in a report via api
> in order to be positioned absolutely. I stumbled upon the
> FreeFormHandle, but it seems like
> A. I am using it wrong or
> B. Absolute position is not possible at all.
>
>
> FreeFormHandle free = factory.newFreeForm(null);
> free.setWidth(400 + "pt");
> free.setHeight(400 + "pt");
> free.setX(100 + "pt");
> free.setY(150 + "pt");
> LabelHandle labeltest = factory.newLabel(null);
> labeltest.setText("Hello World");
> free.addElement(labeltest, 0);
> design.getBody().add(free);
>
>
> I would appreciate any help!
>
> Thanks
> chris
Re: Absolute position in report via API [message #815910 is a reply to message #815568] Thu, 08 March 2012 07:33 Go to previous message
Chris K is currently offline Chris KFriend
Messages: 18
Registered: February 2012
Junior Member
Jason,

thanks for your quick reply.

Unfortunately, I allow the user in my application to position elements on absolute position (absolute layer with drag & drop mechanism). These positions must somehow be transferred to BIRT via API.

I already tried to implement a mapping-mechanism, which maps absolute position to several grids with custom widths/heights. The result is still disappointing, because tricky positioning of elements will result in improperly generated grids.

I thought there must be an element in BIRT, where I may set x,y coordinates... :/

Chris
Previous Topic:Report Chart is being clipped on viewer
Next Topic:How to resize crosstab cell
Goto Forum:
  


Current Time: Wed Nov 26 20:39:01 GMT 2014

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

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