Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Selection not returning some records 1

Status
Not open for further replies.

-cush-

Programmer
Feb 18, 2004
145
US
I could swear I submitted this about 6 hours ago, but it's not in my list of threads I've started. Anyway, I have the following record selection formula in a subreport:

{CA_NOTES_VW.CA_OBJECT_ID} = {?Pm-CA_OBJECT_VW.CA_OBJECT_ID} and
({CA_NOTES_VW.COMMENT_CODE} = 'BPRINT' or {CA_NOTES_VW.PRINT_ON_CASE} = "Y")

It is bringing back the records where {CA_NOTES_VW.COMMENT_CODE} = 'BPRINT', but it is not bringing back the records where {CA_NOTES_VW.PRINT_ON_CASE} = "Y"

Any ideas why?
 
I think you need to lay the comment code and print on case fields in the detail section and observe whether there are instances where they don't coincide. This might also be an issue of nulls. Can either of them be null? Is one always null when the other is not?

-LB
 
I have done as you have suggested. I was thinking this may be a null issue as well. If {CA_NOTES_VW.COMMENT_CODE} is null (and it often is) then I still need to show the records where {CA_NOTES_VW.PRINT_ON_CASE} = "Y
 
{CA_NOTES_VW.CA_OBJECT_ID} = {?Pm-CA_OBJECT_VW.CA_OBJECT_ID} and
(
(
isnull({CA_NOTES_VW.COMMENT_CODE}) and
{CA_NOTES_VW.PRINT_ON_CASE} = "Y"
) or
{CA_NOTES_VW.COMMENT_CODE} = 'BPRINT'
)

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top