crystal reports - Subreport parameters not being used when 0 records -


i have subreport in crystal report there 0 records returned, subreport insists on pulling every order remark ever entered yet still displaying 0 remarks.

it's odd, says "reading records 0 of 150000" , keeps increasing.

the subreports selection critera company code, customer code , order number. passed "{?pm-..." thing going on.

i opened blank subreport's preview , sql didn't make mention of selection criteria. query run indeed show every remark.

any thoughts on how can happen?

subreport formula:

({e_ord_h.comp_code} = {?pm-e_ord_h.comp_code}) , ({e_ord_h.cust_code} = {?pm-e_ord_h.cust_code}) , ({e_ord_h.ord_num} = {?pm-e_ord_h.ord_num}) 

when crystal report behaves means there logic cannot done on db server, must done locally. caused using cr function in record selection formula doesn't translate db's language.

in case, believe when parameters null causing (for example, statement {e_ord_h.comp_code}=<null> does not mean cr able anticipate situation , substitute {e_ord_h.comp_code} null in place in subreport's query. instead, need explicitly check null-valued parameters:

not(isnull({?pm-e_ord_h.comp_code}))  , {e_ord_h.comp_code} = {?pm-e_ord_h.comp_code} , not(isnull({?pm-e_ord_h.cust_code}))  , {e_ord_h.cust_code} = {?pm-e_ord_h.cust_code} , not(isnull({?pm-e_ord_h.ord_num})) , {e_ord_h.ord_num} = {?pm-e_ord_h.ord_num} 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -