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.
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.
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
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