Can KReporter Implement Logicals in a Where type clause?

Just last year we installed KReporter 3 and are now using it for reports…

We’ve run into a number of things we’d like to do but can not figure out how to do them (or if they are even possible)… For example:

I can create a report query containing a where clause like:

where (field1 = ‘NH’) OR (field1 = ‘ME’)

but can KReporter simulate a where clause like this:

where (field1 = ‘NH’ OR field1 = ‘ME’) AND (field2 contains ‘Director’) ??

I can’t seem to figure out how to do this.

Any help would be greatly appreciated.

Thanks much,

Hi Tim, yes it possible. You need to create a where group for field1 and set the select clause to OR for this group. Here are my comments to the uploaded screenshots:

  1. field2 is dragged as usual. Please note that in root we have the select clause set on “AND”. This ensures that all dragged fields are linked with AND for the where clause.
  2. Add a where group: select root, then push add-Button. Enter a name for the group. OK.
  3. The new where group is now selected. If not, click on it. Then select “OR” in select Clause.This ensures that the fields for this group are linked with “OR” in where clause. Drag field1 twice to the fields panel and set operator and value as usual.

Alternative: you might prefer to have 2 where groups under root. One for field1 and 1 for field 2.
In that case: root select clause AND; field1group select clause OR ; field2group select clause AND


I can NOT tell you how grateful I am for your assistance… I’ve not been able to find a solution… but now, thanks to you, I realize I’ve somehow overlooked the power in using the Group functionality… which opens up many more possibilities for me.

Your thoughtful, patient and concise solution was explicitly clear and easy to understand… and it worked immediately!!

I understand the time it took for you to create such a nice response and actually do screenshots. They just added the clarity I needed.
You’ve made my world a happy place… Very much appreciated.