Skip to main content



      Home
Home » Archived » BIRT » Dynamic images
Dynamic images [message #244409] Fri, 22 June 2007 14:44 Go to next message
Eclipse UserFriend
Originally posted by: sunadmn.gmail.com

Hello all I am trying to do some dynamic images inside BIRT. I have been
having one heck of a time building anything from my data set so I come to
you hoping someone can show me an example of how one might build a dynamic
image from three data sources (good,fair,poor). I want to have a
horizontal image with three colors that represent the above and also when
you mouse over each section of color I want to on mouse over action to
display the numeric data. Is any of this even possible?

Thanks,
-Steve
Re: Dynamic images [message #244760 is a reply to message #244409] Tue, 26 June 2007 02:24 Go to previous messageGo to next message
Eclipse UserFriend
Not sure if I understand your problem, but if you want to map the value of
one column in a dataset to an icon (say 0 is poor.png, 1 is fair.png, etc),
then you simply add the three images to the table cell and control their
visibility based on the value of that column.

As for the tooltip, put this Javascript in the onCreate() method of each
image

this.helpText = row["whatever_the_columnname"]

HTH,

Olaf

On 22.06.2007 20:44:18, wrote:
> Hello all I am trying to do some dynamic images inside BIRT. I have been
> having one heck of a time building anything from my data set so I come to
> you hoping someone can show me an example of how one might build a dynamic
> image from three data sources (good,fair,poor). I want to have a
> horizontal image with three colors that represent the above and also when
> you mouse over each section of color I want to on mouse over action to
> display the numeric data. Is any of this even possible?
>
> Thanks,
> -Steve
>
>
Re: Dynamic images [message #244952 is a reply to message #244760] Tue, 26 June 2007 15:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sunadmn.gmail.com

Olaf,

I was actually wanting to create images on the fly, like I have a Perl CGI
I wrote sometime back that uses the GD libs to do true dynamic image
creation. I might be under the wrong asumtion here and the BIRT framework
may not be able to actually do this.

Thanks,
-Steve
Re: Dynamic images [message #244961 is a reply to message #244952] Tue, 26 June 2007 16:31 Go to previous messageGo to next message
Eclipse UserFriend
Hello Steve,

I may be way off base, but have you thought of creating your own ReportItem
extension. Basically you would extend BIRT to have a control that would
create the image based on information that it would receive either from a
dataset, parameter, or java object. Have a look at the RotatedText example
which shows a BIRT extension which rotates some text.

Scott Rosenbaum

> Olaf,
>
> I was actually wanting to create images on the fly, like I have a Perl
> CGI I wrote sometime back that uses the GD libs to do true dynamic
> image creation. I might be under the wrong asumtion here and the BIRT
> framework may not be able to actually do this.
>
> Thanks,
> -Steve
Re: Dynamic images [message #244972 is a reply to message #244961] Tue, 26 June 2007 17:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sunadmn.gmail.com

Thanks Scott I will take a peak there.

-Steve
Re: Dynamic images [message #245025 is a reply to message #244972] Wed, 27 June 2007 03:24 Go to previous messageGo to next message
Eclipse UserFriend
You may also be able to use a dynamic image :

- write a Java-class that does the image generation and returns a byte array
- throw that class into the birt classpath
- instantiate and use that class from within the dynamic image expression to
return the byte array

Olaf



On 26.06.2007 23:22:33, wrote:
> Thanks Scott I will take a peak there.
>
> -Steve
>
>
Re: Dynamic images [message #245206 is a reply to message #245025] Wed, 27 June 2007 15:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sunadmn.gmail.com

Now that really makes sense Olaf thanks a million.

-Steve
Re: Dynamic images [message #245247 is a reply to message #245025] Wed, 27 June 2007 16:38 Go to previous messageGo to next message
Eclipse UserFriend
Olaf, great idea. I of course want to add my two cents (perhaps this is
my second two cents so it is actually four cents).

I think that Olaf's suggestion is good if your report developers are comfortable
handling the interface to the java classes directly. If they are just use
the dynamic image with some example code of how to interact with your java
class.

On the other hand if your report developers are looking for something that
is basically drag&drop easy to use, then I would go to the trouble of doing
a ReportItem extension. With the ReportItem extension you can extend the
palette to have a StevesDynamicImage. Report developers simple drag and
drop the image onto their report and use the appropriate properties based
interfaces to define how your image rendering classes work.

The approach is more work initially, but could be less work under the right
circumstances.

Depending on what your image generation control is doing it could be used
in a lot of interesting ways.

Scott


> You may also be able to use a dynamic image :
>
> - write a Java-class that does the image generation and returns a byte
> array
> - throw that class into the birt classpath
> - instantiate and use that class from within the dynamic image
> expression to
> return the byte array
> Olaf
>
> On 26.06.2007 23:22:33, wrote:
>
>> Thanks Scott I will take a peak there.
>>
>> -Steve
>>
Re: Dynamic images [message #245299 is a reply to message #245247] Thu, 28 June 2007 02:28 Go to previous message
Eclipse UserFriend
Scott,

the ReportItem extension is of course the clean solution.

I mostly use ReportItems in a library for such cases: massage one report item
with scripts etc until it does what I want and then reference it from the
reports. The biggest issue with that approach is that I cannot parameterize
the library report items, so my reports have to stick to conventions, e.g. as
regards column names. (You can use user parameters or named expressions, but
there are important circumstances where you cannot access them in the report
item; e.g. I think in the visibility expression you cannot use them).

Olaf

On 27.06.2007 22:38:12, Scott Rosenbaum wrote:
> Olaf, great idea. I of course want to add my two cents (perhaps this is
> my second two cents so it is actually four cents).
>
> I think that Olaf's suggestion is good if your report developers are
> comfortable handling the interface to the java classes directly. If they
> are just use the dynamic image with some example code of how to interact
> with your java class.
>
> On the other hand if your report developers are looking for something that
> is basically drag&drop easy to use, then I would go to the trouble of
> doing a ReportItem extension. With the ReportItem extension you can extend
> the palette to have a StevesDynamicImage. Report developers simple drag
> and drop the image onto their report and use the appropriate properties
> based interfaces to define how your image rendering classes work.
>
> The approach is more work initially, but could be less work under the
> right circumstances.
>
> Depending on what your image generation control is doing it could be used
> in a lot of interesting ways.
>
> Scott
>
>
>> You may also be able to use a dynamic image :
>>
>> - write a Java-class that does the image generation and returns a byte
>> array
>> - throw that class into the birt classpath
>> - instantiate and use that class from within the dynamic image
>> expression to
>> return the byte array
>> Olaf
>>
>> On 26.06.2007 23:22:33, wrote:
>>
>>> Thanks Scott I will take a peak there.
>>>
>>> -Steve
>>>
>
>
>
Previous Topic:Deploying a Report that use my own Data Source and Data Set
Next Topic:PDF Grid Border Problem
Goto Forum:
  


Current Time: Sat May 10 10:26:25 EDT 2025

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

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

Back to the top