Skip to Content
author's profile photo Former Member
Former Member

Crystal Formula Question

IF{OCHO.Details}= "Cancelled" then 0 else

{OCHO.CheckSum}

I am trying to get CheckSum to show proper check amount unless the check was cancelled. If the check was cancelled I want to show a zero amount for the check

I know I am missing something simple???

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Dec 10, 2012 at 05:06 AM

    Hi Dan,

    Use the below formula:

    SELECT CASE [OCHO.Details]

    WHEN 'Cancelled' then '0'

    ELSE [OCHO.CheckSum]

    END

    Hope this would work.

    Regards,

    Azeem

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 10, 2012 at 05:21 AM

    Hi Dan Chipchase,

    Please try this:

    SELECT case when T0.[Details] like '%%cancelled%%' or T0.[Details] is null then '0' else T0.[Details] end FROM OCHO T0

    Thanks & Regards,

    Nagarajan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2012 at 06:25 AM

    Hi ,

    Try This,

    select (Case When T0.[Details]='Cancelled' then 0 Else (T0.CheckSum) END) from OCHO T0

    Regards,

    Prasad

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you!

      It is not working? States I am missing a ( at CASE?

      select (Case When T0.{OCHO.Details}='Cancelled' then 0 Else (T0.{OCHO.CheckSum}) END) from OCHO T0

      Let me know your thoughts.

      Dan

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2012 at 10:24 AM

    Hi,

    Please close the thread if issue is resolved

    Regards,

    Prasad

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.