on 09-22-2008 5:57 PM
Would someone try the below code and see if 9/9/1999 shows up. "{TableName.Sales_Date}" is a date-time field ? Thanks ! ! !
If {Sales_Primary.Type_Of_Sale} = 1 And
Isnull({TableName.Sales_Date}) Then #9/9/1999#
Else
{TableName.Sales_Date};
Hi Lenell,
Try this instead:
If {Sales_Primary.Type_Of_Sale} = 1 And
Isnull({TableName.Sales_Date}) Then Date (1999, 9, 9)
Else
{TableName.Sales_Date};
Also go to File | Report Options and see if you have Convert Database Null Values to Default and Convert Other Null Values to Default turned on.
If these are on then try:
If {Sales_Primary.Type_Of_Sale} = 1 And
{TableName.Sales_Date} = Date (0,0,0) Then Date (1999, 9, 9)
Else
{TableName.Sales_Date};
Most likely it's how Crystal is handling the NULLs that's the problem.
Good luck,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Raghavendra,
Did not work . . . nothing placed in the field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Brian,
That did it . . . Thanks ! ! ! If I wanted insert "Date Missing" instead of '9/9/1999', Is this possible with a date field ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to get "Date Missing" then you need to convert the field to totext() in else condition because If statement will work only when the retun type is same datatype.
Try the following
If {Sales_Primary.Type_Of_Sale} = 1 And
Isnull({TableName.Sales_Date}) Then "Date Missing"
Else
totext({TableName.Sales_Date});
Regards,
Raghavendra
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.