Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Barcode on the fly
Barcode on the fly [message #367173] Tue, 24 February 2009 07:31 Go to next message
Tomáš Andrýsek is currently offline Tomáš AndrýsekFriend
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 14:53 Go to previous messageGo to next message
Tomáš Andrýsek is currently offline Tomáš AndrýsekFriend
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 17:22 Go to previous messageGo to next message
Eclipse UserFriend
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 09:29 Go to previous message
Tomáš Andrýsek is currently offline Tomáš AndrýsekFriend
Messages: 10
Registered: July 2009
Junior Member
Thank You,
it is working exactly how I need.

Tomas

"Jason Weathersby" <jasonweathersby@alltel.net> p
Previous Topic:Gantt chart doesn't appear on webinterface
Next Topic:Formating a Barchart Legend
Goto Forum:
  


Current Time: Tue Apr 23 15:52:04 GMT 2024

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

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

Back to the top