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

NULL Value

Status
Not open for further replies.

jmd0252

Programmer
May 15, 2003
667
OK,, I have a one byte field in a file, Crystal XI R2, is treating it as a string. It is coming from a SQL 2005 database. I want a formula that say use this record if this field is "null". Nulls are set to default values for nulls in the formula editor. When I look in sql manager it says "null". Something is avoiding me here, and I cannot figure out what. So any ideas are greatly appreiciated.
 
Hi,
In your record selection formula, have you tried:

IsNull({Table.Field})



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
If you have selected default values for null as indicated above, Crystal will return a default value based on the field type. For example:

field data type number will return a 0 using that setting
field data type string will return a ""

try changing it back to Exceptions for Null and then test for null as Turk suggested.

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
CoSpringsGuy,, been there done that,, did not work.. took away all records,, when I said include when equal to "",, not necessarily that way,,
here is my formula now..

{AG_TICKETHISTORY.TICKET_DATE} in {?Begin Date} to {?End Date} and
{AG_TICKETHISTORY.TRANSACTION_TYPE} <> "<TT"

I did it thru the select expect.. The field I want to check for a null value is {AG_TICKETHISTORY.DELETE_FLAG},, when a record is deleted is becomes Y,, otherwise it is null. and yes I have tried the opposit way also, selecet when the field is not Y,, I get the same result all records are excluded.
more ideas???
 
put this in your record selection formula.

isnull({AG_TICKETHISTORY.DELETE_FLAG})
and
{AG_TICKETHISTORY.TICKET_DATE} in {?Begin Date} to {?End Date}
and
{AG_TICKETHISTORY.TRANSACTION_TYPE} <> "<TT"

use Exceptions for Null option.

see if you get the records back you are looking for.

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
I did not change the use Exceptions, but it seems to have worked..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top