Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Show Checkbox image or unchecked image from result(show an image depending on if the column result equals 1 or 0?)
Show Checkbox image or unchecked image from result [message #1847218] Tue, 19 October 2021 15:15 Go to next message
Stuart Oxley is currently offline Stuart OxleyFriend
Messages: 8
Registered: January 2020
Junior Member
I have tried different methods and I am not able to show an image (checkbox) when the column value equals 1 or another image (unchecked box) when the column value equals 0.

I've tried using the following expression:

if( row["acceptsplititem"] == 1 ){
"checked-50x49.jpg";
}else if( row["acceptsplititem"] == 0 ){
"unchecked-50x49.jpg";
}

---------------------------------------------------------------------------------------

I've tried adding both images (checked and unchecked) by dragging the image report item and selecting from image file in shared resources, then editing the URL of the image via: Properties > Advanced > URL

if( row["acceptsplititem"] == 1 ){
"checked-50x49.jpg";
}else if( row["acceptsplititem"] == 0 ){
"unchecked-50x49.jpg";
}


--------------------------------------------------------------------------------------------

I've tried:

onCreate on the row itself

var myqty = this.getRowData().getColumnValue("preferred");
if( 1 ){
this.file = "checked.jpg";
}else if( 0 ){
this.file ="crosschecked.jpg";
}else{
this.file="other.jpg";
}

-------------------------------------------------------------------------------------------

I've also tried another suggestion from another forum:

if( row["acceptsplititem"] == 1 ) {
"checked-50x49.jpg"
} else if( row["acceptsplititem"] == 0 ) {
"unchecked-50x49.jpg"
} else {
"unknown.jpg"
}


----------------------------------------------------------------------------------------

Can someone please tell me how I can do this, it would be useful to know how I can show checkboxes for results

Re: Show Checkbox image or unchecked image from result [message #1847311 is a reply to message #1847218] Fri, 22 October 2021 11:11 Go to previous message
Stuart Oxley is currently offline Stuart OxleyFriend
Messages: 8
Registered: January 2020
Junior Member
Have found the best solution is to Embed an image and then use visibility with an expression to state if row["Example"]==1

Previous Topic:Request for help passing an application parameter in Maximo BIRT
Next Topic:org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
Goto Forum:
  


Current Time: Thu May 02 04:17:27 GMT 2024

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

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

Back to the top