on 2023 Nov 01 3:20 PM
Hi,
Some details printouts are doubled. Roughly I know why. As I have two table fields connected by left outer join:
V_BI_ACKNWLDGMNT.ORDER_NO --> V_ORDER_LN_TEXT.ORDER_NUM
V_BI_ACKNWLDGMNT.RECORD_NO --> V_ORDER_LN_TEXT.ORDER_LINE
And trouble is that in V_ORDER_LN_TEXT table my record apprears twice
but just with different ORDER_TYPE. But CR still prints it twice:
I've tried to suppress it using ORDER_TYPE but CR always prints it twice anyway.
I need to print TEXT from V_ORDER_LN_TEXT only when ORDER_TYPE = 9999. Any way to do that?
Request clarification before answering.
To add to Jamie's answer, because of the OR, you need to use parentheses to get the filter to process correctly. Something like this:
(isnull({TEXT}) and {ORDER_TYPE} = 2) or
(not isnull({TEXT}) and {ORDER_TYPE} = 9999)
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kris, it could be that your {text} field is actually blank in some cases, i.e. "", as opposed to being a NULL value. This could be the actual data or that in the Report Options that you are converting null data values to a default non-null.
(isnull({TEXT}) and {ORDER_TYPE} = 2) or
(trim({TEXT}) = "" and {ORDER_TYPE} = 2) or
(not isnull({TEXT}) and {ORDER_TYPE} = 9999) or
(trim({TEXT}) <> "" and {ORDER_TYPE} = 9999)
OK thanks Kris, that's very helpful. There's several ways to deal with this...
isnull({TEXT}) and {ORDER_TYPE} = 2 or
not isnull({TEXT}) and {ORDER_TYPE} = 9999
My worry about the above Record Selection Formula is that you might be missing out on some data that you need on the report...i.e. you might have additional conditions based on the order type and text etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kris, in your Report > Selection Formulas > Record use one of the following, depending on what you're trying to accomplish with filtering out the orders.
{ORDER_TYPE} = 9999
or
isnull({ORDER_TYPE}) or {ORDER_TYPE} = 9999
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie,
That's a nice hint about Record Selection formulas - I might use it in a future.
In this particular case I'm not sure will be able to use it as after applying the record filter I can see only two records - 006 & 007. It's not so easy to use it as I need a lot of data from ther tables and filter cuts them out.
For ex. ITEM, QTY, PART NUMBER from details A are coming from main V_BI_ACKNWLDGMNT table and only TEXT in details B should come from V_ORDER_LN_TEXT table but only when ORDER_TYPE = 9999
Yes. It prints weird results, like just line 001 and 002.
I have 7 line items in this case. As said before most of items data comes from main table V_BI_ACKNWLDGMNT. Rest of the data is optional sometmes lines do have it sometimes don't (V_ORDER_LN_TEXT.TEXT is extra note to the mail line).
Like on this screenshot: ORDER_NUM=13 does have optional TEXT only for some ORDER_LINES. Does not have anything for line 0020
Please let us know out of the screenshot exactly what records, using Order_Num should be returned n the report Details and which ones should not.
If the goal is not to filter anything, but just have a conditional display, then that is different than filtering. If you want to bring back all of the Order Numbers like in the screenshot and just have a conditional display for Text, then that's done by adding a Formula.
if {ORDER_TYPE} = 9999 then {TEXT} else ""
Ok,
That's what I got right now:
All of the "details A" data comes from V_BI_ACKNWLDGMNT table - that's the master.
IF there's extra note for one of the lines (001, 002 etc) it's being stored in V_ORDER_LN_TEXT table under TEXT column with ORDER_TYPE=9999. Unfortunately in some cases also line with ORDER_TYPE=2 is being generated
All I need is to get this extra note (so when ORDER_TYPE=9999).
User | Count |
---|---|
73 | |
21 | |
9 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.