johnkeuning
Technical User
Could someone please help me with the following problem?
I am new to Crystal Reports so maybe it is very simple but I can't seem to get it right.
I am making a report based on 3 tables: ORDHEAD(order header),ORDLINE(orderlines) and ORDLMSG(orderline messages). The tables are linked by ORD_CNTRL_NO and ORD_LINE_NO.
ORDHEAD.ORD_CNTRL_NO=ORDLINE.ORD_CNTRL_NO
ORDLINE.ORD_CNTRL_NO=ORDLMSG.ORD_CNTRL_NO
ORDLINE.ORD_LINE_NO=ORDLMSG.ORD_LINE_NO
The ORD_CNTRL_NO is one of the input parameters.
For each orderline I have 5 different orderline messages with each a different MSG_FLG(message flag), T,X,Y,W and Z.
For each orderline the set of 5 orderline messages contains the same information. This is a given situation.
In the header I want to put part of a field from the ORDLMSG table called MESSAGE_TEXT, so I made a formula :
left({ordlmsg.message_text},30).
However I only want this to be printed when ORDLMSG.MSG_FLG='Z'. When I try to create this condition Crystal seems to be reading only the first record which happens to have MSG_FLG='T';
How do I tell Crystal to select the correct record?
Sorting the records is no option because I have to do the same thing for each of the different MESSAGE_TEXT records.
Thanks in advance
I am new to Crystal Reports so maybe it is very simple but I can't seem to get it right.
I am making a report based on 3 tables: ORDHEAD(order header),ORDLINE(orderlines) and ORDLMSG(orderline messages). The tables are linked by ORD_CNTRL_NO and ORD_LINE_NO.
ORDHEAD.ORD_CNTRL_NO=ORDLINE.ORD_CNTRL_NO
ORDLINE.ORD_CNTRL_NO=ORDLMSG.ORD_CNTRL_NO
ORDLINE.ORD_LINE_NO=ORDLMSG.ORD_LINE_NO
The ORD_CNTRL_NO is one of the input parameters.
For each orderline I have 5 different orderline messages with each a different MSG_FLG(message flag), T,X,Y,W and Z.
For each orderline the set of 5 orderline messages contains the same information. This is a given situation.
In the header I want to put part of a field from the ORDLMSG table called MESSAGE_TEXT, so I made a formula :
left({ordlmsg.message_text},30).
However I only want this to be printed when ORDLMSG.MSG_FLG='Z'. When I try to create this condition Crystal seems to be reading only the first record which happens to have MSG_FLG='T';
How do I tell Crystal to select the correct record?
Sorting the records is no option because I have to do the same thing for each of the different MESSAGE_TEXT records.
Thanks in advance