Dynamic Image in BIRT
I want to add an image to my report that should depend on a condition. If the condition is true, an image must appear and if there is false the image would be different.
I follow the following steps (extracted of the document birtCrossTabTutorialAdvanced.pdf):
1.- I drag an image item from the palette to the layout.
2.- I select image from an URI and use the following expression in the field enter URI:
If (true) "image_1.gif" else "image_2.gif"
3.- On click OK, the following message appears:
The image cannot be loaded
An unexpected internal exception occurred. Please see log for detail.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Designer UI
Plug-in ID:org.eclipse.birt.report.designer.ui
Version:2.2.1.r22a_v20071101
Error Code:Error.GUIException.invokedByUnexpectedException
Error Message:Caused by java.lang.IllegalArgumentException.
-I have tried to load the images separately ("image_1.gif" and "image_2.gif"), without condition, and do not have any problem.
-There is some way of doing something similarly in BIRT report desginer 2.2.1 or where the mistake can be?
I follow the following steps (extracted of the document birtCrossTabTutorialAdvanced.pdf):
1.- I drag an image item from the palette to the layout.
2.- I select image from an URI and use the following expression in the field enter URI:
If (true) "image_1.gif" else "image_2.gif"
3.- On click OK, the following message appears:
The image cannot be loaded
An unexpected internal exception occurred. Please see log for detail.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Designer UI
Plug-in ID:org.eclipse.birt.report.designer.ui
Version:2.2.1.r22a_v20071101
Error Code:Error.GUIException.invokedByUnexpectedException
Error Message:Caused by java.lang.IllegalArgumentException.
-I have tried to load the images separately ("image_1.gif" and "image_2.gif"), without condition, and do not have any problem.
-There is some way of doing something similarly in BIRT report desginer 2.2.1 or where the mistake can be?
0
Comments
-
I'm not sure if this is exactly what you are looking for, but it illustrates one way to accomplish the dynamic image:<br />
<br />
<a class='bbc_url' href='http://download.eclipse.org/birt/downloads/examples/reports/Image/Image.html'>http://download.eclipse.org/birt/downloads/examples/reports/Image/Image.html</a>0 -
Sorry for the multi post, but found another good link for you:<br />
<br />
<a class='bbc_url' href='http://digiassn.blogspot.com/2007/12/birt-dynamic-images.html'>http://digiassn.blogspot.com/2007/12/birt-dynamic-images.html</a><br />
<br />
I think this example is closer to what you are trying to accomplish.0 -
Thanks JMaleski for all.<br />
<br />
In <a class='bbc_url' href='http://digiassn.blogspot.com/2007/12...ic-images.html'>http://digiassn.blogspot.com/2007/12...ic-images.html</a> it is what I want to do, except for a thing, I do not want to use a report parameter in the condition, I want use an expression extracted of the information of the data report. for example, if an customer has bougth 2 products that shows an image and if has bougth 4 products shows other one.0 -
Again with the double posts : /
Anyway, I attached a quick dummy .rptdesign file along with a happy.bmp and sad.bmp. Just setup the resource folder and throw the images in there, it should be a quick example of how to change the image that is being displayed based on variables in the report.
Regards0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 145 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management