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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Records with Null Fields not Showing

Status
Not open for further replies.

dnboughton

Technical User
Oct 26, 2005
14
US
CR8.5
Oracle DB


I've created a simple report, using the select expert. The select expert formula shows:

not ({WORKORDER.EQNUM} in "19375", "19376", "19382", "19378", "19381", "19373", "19370", "19368", "19363", "19384", "19371", "19359"]) and
{WORKORDER.ACTFINISH} in DateTime (2005, 06, 30,23, 59, 59) to DateTime (2006, 01, 01,00, 00, 00)

the problem is that if my eqnum has no value is is left out of the selection. I need these records to show.

Thank you in advance!
 
Go to report->selection formula->record and change the formula to:

(
isnull({WORKORDER.ACTFINISH}) or
{WORKORDER.ACTFINISH} in DateTime (2005, 06, 30,23, 59, 59) to DateTime (2006, 01, 01,00, 00, 00)
) and
not ({WORKORDER.EQNUM} in ["19375", "19376", "19382", "19378", "19381", "19373", "19370", "19368", "19363", "19384", "19371", "19359"])

-LB
 
Rather than the select expert, use Report->Edit Selection Formula->Record and adjust it to:

(
isnull({WORKORDER.EQNUM})
or
trim({WORKORDER.EQNUM}) = ""
)
and
(
not ({WORKORDER.EQNUM} in ["19375", "19376", "19382", "19378", "19381", "19373", "19370", "19368", "19363", "19384", "19371", "19359"])
)
and
(
{WORKORDER.ACTFINISH} in DateTime (2005, 06, 30,23, 59, 59) to DateTime (2006, 01, 01,00, 00, 00)
)

There was also a typo in your formula in that the starting bracket for the IN wasn't showing for the EQNUMs.

I've made the assumption that you still want the date portion of the filtering to apply to those with null EQNUMs.

If you'd like to supply ample information with your posts, include:

Crystal version
Database/connectivity used
Example data (not what's in the report, the data!)
Expected output (what should the report show based no the example data)

-k
 
Sorry, I misread and thought it was the date field that could be null.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top