locked
formula in crystal reports for checking default valu 0.00 and null then i want count RRS feed

  • Question

  • User432111325 posted

    Hi,I am hari,I am new to crystal report,i have developed a crystal report ,now i want to show count of amount field ,it displays default value 0.00,i want to check null null condition,I want to show count of amount when amount is not having default value and it does not have not null,can any one give that formula,can any one reply to me pls,plhkrishna@hotmail.com,


    i tried the below formula but i faced some errors,

    If IsNull({Symphony_Care5000_TPA_Reports_TPARetrieveServiceAgent_UnutilizedAuthorization.AlAmountOp}) Or

    trim(CStr({Symphony_Care5000_TPA_Reports_TPARetrieveServiceAgent_UnutilizedAuthorization.AlAmountOp})) = "0.00" Then

    ""
    Else
    DistinctCount({Symphony_Care5000_TPA_Reports_TPARetrieveServiceAgent_UnutilizedAuthorization.AlAmountOp})

    Friday, April 13, 2012 1:01 PM

Answers

  • User-2075826951 posted

    Crystal Reports XI has some new(?) features for dealing with nulls, but nulls are always very tricky in every language, environment, database and with every IDE.  Whatever solution you use / come up with you will need to rigorously test every conceivable exception and will still probably get caught out by some scenario you didn't think of / test.  It is best to set default values, but CR XI has an option for when you first set up a report:

    File>Options>Reporting 'Reading Data' "Convert Database NULL Values to Default" (for Db data) & "Convert Other Null Values to Default" (for values returned from other formulas)

    Also, in the Formula Editor itself there is a menu-bar drop-down 'Exceptions for Nulls' with "Exceptions For Nulls" & "Default Values For Nulls".  These settings are for this one formula only.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 13, 2012 2:36 PM