[Solved] Conditional Print Expression or Formula

Getting your data onto paper - or the web - Discussing the reports features of Base

[Solved] Conditional Print Expression or Formula

Postby nathan3553 » Sat Oct 18, 2014 9:53 pm

I am using Oracle Report Builder:

I have a boolean field that I want to display a check mark(will settle for an asterisk) if the value is TRUE. If false, display nothing.
Is this possible using Conditional Print Expression or a Data Formula? What Formatting is required?
Last edited by nathan3553 on Thu Oct 23, 2014 7:09 pm, edited 1 time in total.
OpenOffice 4 on Windows 7/OpenOffice 4 on MacOSX
nathan3553
 
Posts: 17
Joined: Sat Oct 18, 2014 6:35 pm

Re: Conditional Print Expression or Formula

Postby Nocton » Tue Oct 21, 2014 10:35 am

As far as I know, formatting options for Boolean fields only give TRUE and FALSE.
I do it in a Query for the report.
Code: Select all   Expand viewCollapse view
CASEWHEN( [BooleanField], 'Yes', 'No' )


Replace Yes and No with whatever text you want.

Regards,
Nocton
OpenOffice 4.2.0 on Windows 10
Nocton
Volunteer
 
Posts: 508
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Conditional Print Expression or Formula

Postby Villeroy » Tue Oct 21, 2014 11:16 am

The "normal" reports created without the report builder extension are simple Writer tables. When you open the report for editing (right-click>Edit) then you see a table with 2 place holder rows; first row for column labels, second row for data. Format the respective cell representing your boolean field in the second row.
This number format code shows the text "Yes" for any positive value (boolean TRUE is equivalent to +1), "" for negative numbers (does not apply) and "" for zero (boolean FALSE is equivalent to 0).
Code: Select all   Expand viewCollapse view
"Yes";"";""
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27706
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Conditional Print Expression or Formula

Postby nathan3553 » Wed Oct 22, 2014 10:00 pm

It sounds like the answer is you cannot replace a boolean value of True with a check mark or asterisk, correct?

I'm currently already displaying True and when False, nothing.
OpenOffice 4 on Windows 7/OpenOffice 4 on MacOSX
nathan3553
 
Posts: 17
Joined: Sat Oct 18, 2014 6:35 pm

Re: Conditional Print Expression or Formula

Postby Villeroy » Wed Oct 22, 2014 10:10 pm

Did you try any one of the 2 solutions?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27706
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

[SOLVED] Re: Conditional Print Expression or Formula

Postby nathan3553 » Thu Oct 23, 2014 7:09 pm

I realized what was happening. I added the CASE WHEN logic to my query, but didn't remove the conditional print expression. Once removed and format type changed to text, the BooleanField displayed an asterisk as requested.

Thanks!
OpenOffice 4 on Windows 7/OpenOffice 4 on MacOSX
nathan3553
 
Posts: 17
Joined: Sat Oct 18, 2014 6:35 pm


Return to Reporting

Who is online

Users browsing this forum: No registered users and 1 guest