Dynamic images [message #244409] |
Fri, 22 June 2007 14:44  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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 #245299 is a reply to message #245247] |
Thu, 28 June 2007 02:28  |
Eclipse User |
|
|
|
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
>>>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03918 seconds