Crystalkeen logo
 
Crystalkeen header image 3
Crystalkeen header image 5

Crystal Reports Tools: Improve Performance While Saving Time and Money

  Resources  

Articles:
Administration
Advanced
Basic
Database
Financial

Tools:

Analyzers
CR Schedulers
CR UFLs
CR Viewers
DataBase Tools
Graphics
International
Mail UFLs



 
 

Add'l:
About us

Contact Us
 

CrystalReports
on Steroids

Crystal Reports: Use Descriptions on Boolean Parameters

The report has a Boolean field to indicate if the Customer was active (or not). Our user wanted the report to select Active or Inactive clients.

We used a Boolean parameter, and then to make it the question easier to answer, we created a default pick list with True and False and a description against each one. Then the selection formula was a simple

{Customer.Active} = {?Active}

 

Pick list problems? Then you need cViewPICK, our pick list rebuilder. Don't wait until disaster strikes.

Buy cViewPICK now, and have it on hand so you can act quickly.

cViewPICK: Pick List Rebuilder for Crystal Reports

Does Boolean confuse you? No worries. While some people are intimidated by Boolean,  the truth is it's very simple. Here are the basics.

Electronic circuit designers have the good fortune to work with Boolean represented by discrete symbols that originally represented actual physical components. So, for example, the AND operator is the AND gate. An actual AND gate chip did exist in discrete form, back in the early days of electronic circuitry. Today, such a gate will be one of millions on a single die, and it'll be in there along with millions of transistors.

Anyhow, a "gate" is the basic component of a boolean logic diagram. It helps to draw these out on paper:

AND. Draw a big letter D. Add two inputs on the left and an output on the right:

   =D-

That approximates the Boolean AND symbol for a two-input, one-output AND. When both inputs are true, the output is true. If only one input is true, the output is false. If it's from a politician, then it's always false (ha, ha).

In Boolean logic, true or false are just different ways of saying 1 and 0 (respectively). On the electronic component, both inputs must have the logic voltage (a logic 1) for the output to have the logic voltage.

The AND can have any number of inputs. So instead of those two lines on the left of the D, you could have dozens of them.

Maybe you need 21 conditions to all be true before changing the output to true. Such a scheme is common in control circuits, where you need permissives to all check OK (safety switches 1 - 10 are closed, exhaust damper is open, drain valve is closed, etc.) before you can start the system.

The OR gate is similar in appearance and function. But instead of a D, you have a triangle (same orientation, flat side on the input, "arrow" end on the output). You need just one of these to be true for the output to be true.

That is, the AND requires all inputs to be true but the OR requires only one to be true.

But what if you need two of these to be true? Then put those two conditions on an AND and feed that output to the OR.

Then there's the NOT gate. It's a small o, which you can draw on the line coming into another gate if you wish. It just inverts, so a 0 becomes a 1 (whether input or output). You can use this to build NOR gates, NAND gates, and various combinations thereof. You can use it to say if X is false (NOT the input), then no permissive. Or if X is true, then no permissive (NOT the output of an OR).

So if you're confused by Boolean, just draw it out using the basic symbols and functions. It's a very useful way to build logic. And not just for electronic circuits and Crystal Reports, but for any kind of logical examination of any problem or issue.

 

 

This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects.

 

  • Questions? Please write to mark@crystalkeen.com. We do want your business.
  • Do you have your own tips for Crystal Reports administrators and designers? Write to mark@crystalkeen.com and we'll post your tips with a link to your Website (or with some other attribution if you choose).
  • Crystal Reports is a subsidiary of Business Objects, which is owned by SAP.