Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Overlaying (stamping) an image with label, text or data
Overlaying (stamping) an image with label, text or data [message #365828] Wed, 05 November 2008 20:37 Go to next message
Eclipse UserFriend
Originally posted by: Joachim.Wesenberg.de

Question from a newbie: How do I manage to overlay an image with labels,
text or data?
Thanks for taking the time to answer - Jo
Re: Overlaying (stamping) an image with label, text or data [message #365830 is a reply to message #365828] Wed, 05 November 2008 21:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Joachim,

Try adding a grid that is 1x1 and set its height and width. Create a
style with a background image and apply the style to the grid.
Then drop text, label, or data items in grid.

Jason


Joachim Wesenberg wrote:
> Question from a newbie: How do I manage to overlay an image with labels,
> text or data?
> Thanks for taking the time to answer - Jo
Re: Overlaying (stamping) an image with label, text or data [message #365840 is a reply to message #365830] Thu, 06 November 2008 14:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Joachim.Wesenberg.de

Jason Weathersby wrote:
> Joachim,
>
> Try adding a grid that is 1x1 and set its height and width. Create a
> style with a background image and apply the style to the grid.
> Then drop text, label, or data items in grid.
>
> Jason
>
>
> Joachim Wesenberg wrote:
>> Question from a newbie: How do I manage to overlay an image with
>> labels, text or data?
>> Thanks for taking the time to answer - Jo

Jason,
thanks a lot. That worked fine, but how do I accomplish an exact
positioning of text, label, etc. BIRT let me specify top, bottom,
center. Is there any way to drag it to a desired position within the grid?
Best regards - Jo
Re: Overlaying (stamping) an image with label, text or data [message #365845 is a reply to message #365840] Thu, 06 November 2008 16:09 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Joachim,

You can use the margins and the height/width property in the advanced
properties for the label/text element. Make sure to set the report
layout to fixed in the general properties for the report.

Take a look at this example. Edit the background image style to replace
with your image.

Jason

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.3.1.v20080911 Build &lt;2.3.1.v20080922-1151></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="layoutPreference">fixed layout</property>
<property name="bidiLayoutOrientation">ltr</property>
<styles>
<style name="crosstab" id="4">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="backgroundimage" id="10">
<property name="backgroundImage">C:\Documents and
Settings\jweathersby\My Documents\My Pictures\Chartengine.bmp</property>
</style>
<style name="mylabelstyle" id="15">
<property name="backgroundColor">#004080</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="display">inline</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property
name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<grid id="6">
<property name="style">backgroundimage</property>
<property name="height">3.625in</property>
<property name="width">7in</property>
<column id="7"/>
<row id="8">
<property name="height">3.625in</property>
<cell id="9">
<label id="13">
<property name="style">mylabelstyle</property>
<property name="backgroundColor">#004080</property>
<property name="fontSize">medium</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="marginTop">1.2in</property>
<property name="marginLeft">1in</property>
<property name="whiteSpace">normal</property>
<property name="width">2in</property>
<text-property name="text">My Label</text-property>
</label>
<label id="14">
<property name="style">mylabelstyle</property>
<property name="marginTop">3in</property>
<text-property name="text">My Second
Label</text-property>
</label>
</cell>
</row>
</grid>
</body>
</report>


Joachim Wesenberg wrote:
> Jason Weathersby wrote:
>> Joachim,
>>
>> Try adding a grid that is 1x1 and set its height and width. Create a
>> style with a background image and apply the style to the grid.
>> Then drop text, label, or data items in grid.
>>
>> Jason
>>
>>
>> Joachim Wesenberg wrote:
>>> Question from a newbie: How do I manage to overlay an image with
>>> labels, text or data?
>>> Thanks for taking the time to answer - Jo
>
> Jason,
> thanks a lot. That worked fine, but how do I accomplish an exact
> positioning of text, label, etc. BIRT let me specify top, bottom,
> center. Is there any way to drag it to a desired position within the grid?
> Best regards - Jo
Previous Topic:birt report as print preview on desktop app
Next Topic:How to avoid line break if data is too long
Goto Forum:
  


Current Time: Wed Dec 08 23:24:36 GMT 2021

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

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

Back to the top