[ Bug ] RDD Criteria Error using parenthesis

, ,

Just a Heads-Up Bug.

PRB0114092
Reporting Framework - In RDD if you add any parenthesis to the selection criteria when the report is run it errors saying, “There was a mismatch between the number of left and right parenthesis.

Currently there is no ETA and the only work-around is, well use a BAQ Report. Development has acknowledged the problem. Just in-case anyone searches for it, hope you find this post informational.

1 Like

I have encountered this as well. I found oddities with how many parenthesis are entered and how many Epicor interprets/saves with the RDD. I would put in only one parenthesis but it would save two or I would enter two parenthesis and it would save three. Clearly there is an issue.

In my case I was creating an RDD with multiple BAQs and had a selection criteria of something like “(condition1 AND condition2) OR (condition3 AND condition4)”. Since they were BAQs, I was able to just add a calculated field that considered multiple conditions and then use that in the OR statement so it became “Calculated_Condition1And2 OR Calculated_Condition3And4” without the need for parenthesis.

1 Like

That’s a cool way around it!

If SQL follows standard Boolean logic, where AND is multiplication and OR is addition, then

(C1 AND C2) OR (C3 AND C4) is the same as

C1 x C2 + C3 x C4

Since multiplication takes priority, C1 is AND’d with C2, C3 AND’d with C4, then those two results OR’d together.

If you needed (C1 OR C2) AND (C3 OR C4) without parenthesis,
Convert it to: (C1 + C2) x (C3 + C4)
Then expand it to C1xC3 + C1xC4 + C2xC3 + C2xC4
Then enter as C1 AND C3 OR C1 AND C4 OR C2 AND C3 OR C2 AND C4

But that’s all moot, as I never like to rely on implied order of operation. Parenthesis are your best friend … when they don’t create a false “mismatch error”

Edit

And I recall the rule “break the line, change the sign”

Not (C1 OR C2) AND (C3 or C4) is the same as

 ________  
(C1 OR C2) AND (C3 OR C4)

Breaking the line and changing the sign becomes

 __     __
(C1 AND C2) AND (C3 OR C4)

Which is NOT C1 AND NOT C2 AND C3 OR NOT C1 AND NOT C2 AND C4

Just ran into this error. Sure would be nice if Epicor could fix this.
I am working with Job Traveler - not an easy conversion to RDD Report.

DaveO

1 Like

:grimacing:

There is another thing I observed when using Where Clause in RDD. It brings in all the data for all the companies into the temp-table, hence making the RDD Slow. I need to build a Replication Example, but that basically meant having Company as part of your Criteria is still key. It also indicated that I could make a Cross-Company Report :slight_smile:

1 Like

Mr. Haso: Wow – I did not know about the Company field. I will make sure to include that in the future.

If only Epicor would allow us to add BAQ’s to a standard report RDD i.e. JobTraveler, ARInvoice, POForm, etc. that would be the cats meow.

DaveO

BTW - this Parenthesis problem still exists in 2023.1
And if you are trying to modify a copy of a standard RDD, it’s so annoying.

1 Like

This is still an issue - 2023.1.8.
Just tried to add PartTran to Time Phase Material Report and limit by specific TranType.

Not Today :frowning:

DaveO

Still exists in 2023.2 as well. Ugh…

1 Like

Still exists in 2023.2.11. I tried exporting the .xml, fixing it and re-importing the .xml. It puts the double parenthesis back on the import.

1 Like