<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Case statement in crystal in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaa-p/11145046#M4110535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So instead of working with {c.name}, work with ToNumber(Left({c.name}, 1)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2015 20:30:38 GMT</pubDate>
    <dc:creator>DellSC</dc:creator>
    <dc:date>2015-07-23T20:30:38Z</dc:date>
    <item>
      <title>Case statement in crystal</title>
      <link>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaq-p/11145042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Case when(c.name between 1 and 3) then 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when &lt;SPAN style="font-size: 13.3333330154419px;"&gt;(c.name between 4 and 6) then 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when(c.name between 7 and 9) then 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else 0 &lt;/P&gt;&lt;P&gt;end as xyz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to write this as a formula in crystal?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 19:30:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaq-p/11145042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-23T19:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in crystal</title>
      <link>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaa-p/11145043#M4110532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Chandu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Select {&lt;SPAN style="color: #333333; font-size: 12px;"&gt;c.name}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 12px;"&gt;Case 1 to 3: 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 12px;"&gt;Case 4 to 6: 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 12px;"&gt;Case 7 to 9: 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;STRONG&gt;Default: 0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This particular example can also be written as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If {c.name} in [1 to 9] then 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;Select {&lt;SPAN style="color: #333333; font-size: 12px;"&gt;c.name}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 12px;"&gt;Case 1 to 9 : 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 12px;"&gt;default: 0&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-Abhilash&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 19:40:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaa-p/11145043#M4110532</guid>
      <dc:creator>abhilash_kumar</dc:creator>
      <dc:date>2015-07-23T19:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in crystal</title>
      <link>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaa-p/11145044#M4110533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a case statement in Crystal, but in versions before that was available, I learned to use a Switch statement.&amp;nbsp; For your example, it would look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Switch(&lt;/P&gt;&lt;P&gt;&amp;nbsp; c.name in 1 to 3, 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; c.name in 4 to 6, 2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; c.name in 7 to 9, 3,&lt;/P&gt;&lt;P&gt;&amp;nbsp; true, 0&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first part of each pair is the condition to test for and it must evaluate to true or false, the second is the value you would like to return.&amp;nbsp; The "true" at the end specifies the default value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 19:43:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaa-p/11145044#M4110533</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2015-07-23T19:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in crystal</title>
      <link>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaa-p/11145045#M4110534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks but I realised there is some thing else &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have column which shows the data &lt;STRONG&gt;EXACTLY&lt;/STRONG&gt; like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- Low utility&lt;/P&gt;&lt;P&gt;2-Low utility&lt;/P&gt;&lt;P&gt;3- Low utility&lt;/P&gt;&lt;P&gt;4- Marginal&lt;/P&gt;&lt;P&gt;5- Marginal&lt;/P&gt;&lt;P&gt;6- Marginal&lt;/P&gt;&lt;P&gt;7- Indicated&lt;/P&gt;&lt;P&gt;8- Indicated&lt;/P&gt;&lt;P&gt;9- Indicated&lt;/P&gt;&lt;P&gt;10 Acceptable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to group them between 1 to 3 and 4 to 6 and 7 to 9 and 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am thinking of case statement.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 20:09:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaa-p/11145045#M4110534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-23T20:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in crystal</title>
      <link>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaa-p/11145046#M4110535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So instead of working with {c.name}, work with ToNumber(Left({c.name}, 1)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 20:30:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/case-statement-in-crystal/qaa-p/11145046#M4110535</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2015-07-23T20:30:38Z</dc:date>
    </item>
  </channel>
</rss>

