Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Barcode on the fly
Barcode on the fly [message #367173] Tue, 24 February 2009 02:31 Go to next message
Tomáš Andrýsek is currently offline Tomáš Andrýsek
Messages: 10
Registered: July 2009
Junior Member
Hi,
can anyone help me:
In DB table I have number, which present barcode. I want to make image from
this number and insert it into generated report. I found examples on iText
pages, but i don't know, how can I insert this image during transformation
BIRT document to target document (HTML/PDF/Excel).

Any ideas?

Thanks

Tomas
Re: Barcode on the fly [message #367178 is a reply to message #367173] Tue, 24 February 2009 09:53 Go to previous messageGo to next message
Tomáš Andrýsek is currently offline Tomáš Andrýsek
Messages: 10
Registered: July 2009
Junior Member
Have partial solution, I'm able create barcode image on the fly:) So my next
question is - I have defined image in report, created image on disk (random
name). Is it possible to insert it into report by report definition?
Something like "when render report, make image and place it into document" ?
Thanks

Tomas

"Tom
Re: Barcode on the fly [message #367198 is a reply to message #367178] Wed, 25 February 2009 12:22 Go to previous messageGo to next message
Eclipse User
Originally posted by: jasonweathersby.alltel.net

Tomas,

Can you try using a script similar to the following (oncreate for an
image). Set type to uri.

importPackage(Packages.java.io);
importPackage(Packages.java.lang);

var file = new File("c:/temp/test.png");
var ist = new FileInputStream(file);
var lengthi = file.length();

bytesa = new ByteArrayOutputStream( lengthi);
var c;
while((c=ist.read()) != -1){
bytesa.write(c);
}
ist.close();
this.data = bytesa.toByteArray();

Jason



Tomá¹ Andrýsek wrote:
> Have partial solution, I'm able create barcode image on the fly:) So my next
> question is - I have defined image in report, created image on disk (random
> name). Is it possible to insert it into report by report definition?
> Something like "when render report, make image and place it into document" ?
> Thanks
>
> Tomas
>
> "Tomá¹ Andrýsek" <tomas.andrysek@atlas.cz> pí¹e v diskusním pøíspìvku
> news:go07p8$8jq$1@build.eclipse.org...
>> Hi,
>> can anyone help me:
>> In DB table I have number, which present barcode. I want to make image
>> from this number and insert it into generated report. I found examples on
>> iText pages, but i don't know, how can I insert this image during
>> transformation BIRT document to target document (HTML/PDF/Excel).
>>
>> Any ideas?
>>
>> Thanks
>>
>> Tomas
>>
>
>
Re: Barcode on the fly [message #367207 is a reply to message #367198] Thu, 26 February 2009 04:29 Go to previous messageGo to next message
Tomáš Andrýsek is currently offline Tomáš Andrýsek
Messages: 10
Registered: July 2009
Junior Member
Thank You,
it is working exactly how I need.

Tomas

"Jason Weathersby" <jasonweathersby@alltel.net> p
icon12.gif  Re: Barcode on the fly [message #757704 is a reply to message #367173] Mon, 21 November 2011 05:02 Go to previous message
Adam Barlow is currently offline Adam Barlow
Messages: 10
Registered: April 2011
Junior Member
Recommend Barcode plug-in for Eclipse http://www.keepautomation.com/guide/barcode_birt.html

[Updated on: Mon, 21 November 2011 05:03]

Report message to a moderator

Previous Topic:Birt 3.7 Maven repository
Next Topic:Is it possible to remove postscript option in Export Format window?
Goto Forum:
  


Current Time: Wed Jun 19 07:59:10 EDT 2013

Powered by FUDForum. Page generated in 0.09002 seconds