<?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: Crystal Report if statement in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/crystal-report-if-statement/qaa-p/12410770#M4645648</link>
    <description>&lt;P&gt;Are you sure that the "Def Rec DT" string is in the right case and is an exact match to what's in the data?  I might also take out the "else" part of the if statement - like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if {SSLOM.SearchKey} = {IPJOBM.JOB_NUMBER} and UpperCase({SSLOM.DataItem})= "DEF REC DT" then 
  {SSLOM.AlphaValue} &lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If that doesn't work, you'll need to do some debugging.  For this, I would first take out &lt;/P&gt;&lt;P&gt;and UpperCase({SSLOM.DataItem})= "DEF REC DT"&lt;/P&gt;&lt;P&gt;and see whether the date shows up.  If it does, then there is an issue with the string comparison.  If it doesn't, then the issue is with the SearchKey/JOB_NUMBER comparison.&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jun 2021 14:16:04 GMT</pubDate>
    <dc:creator>DellSC</dc:creator>
    <dc:date>2021-06-01T14:16:04Z</dc:date>
    <item>
      <title>Crystal Report if statement</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-report-if-statement/qaq-p/12410767</link>
      <description>&lt;P&gt;I have a crystal report that is created by linking the table to create the sql query. The query is pulling: Job#, CustomerName, Plant, and DefineDate. When I run the report it pulls back the data correctly but I want it to leave a blank for the DefineDate if the job is a certain status. I created a formula field called DefineDate and put this if statement in there:&lt;/P&gt;
  &lt;P&gt;if {SSLOM.SearchKey} = {IPJOBM.JOB_NUMBER} and {SSLOM.DataItem}= "Def Rec DT" then {SSLOM.AlphaValue} else " "&lt;/P&gt;
  &lt;P&gt;(This is saying if fields match, which is the job# and the status is 'Def Rec DT' print out the data else leave blank.)&lt;/P&gt;
  &lt;P&gt;When I ran the report with this if statement it returned blanks for all the rows returned, but some of them should have returned data.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 04:55:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-report-if-statement/qaq-p/12410767</guid>
      <dc:creator>former_member736866</dc:creator>
      <dc:date>2021-06-01T04:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Report if statement</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-report-if-statement/qaa-p/12410768#M4645646</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;your logical expression might not return expected result.&lt;/P&gt;&lt;P&gt;and also check the below statement.&lt;/P&gt;&lt;P&gt;if TOTEXT({SSLOM.SearchKey}) = TOTEXT({IPJOBM.JOB_NUMBER}) and TOTEXT({SSLOM.DataItem})= 'Def Rec DT' then {SSLOM.AlphaValue} else ' '&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 08:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-report-if-statement/qaa-p/12410768#M4645646</guid>
      <dc:creator>former_member566317</dc:creator>
      <dc:date>2021-06-01T08:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Report if statement</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-report-if-statement/qaa-p/12410769#M4645647</link>
      <description>&lt;P&gt;If you needed ToText to convert something so that they match, Crystal would throw an error.  So this is not needed.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 14:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-report-if-statement/qaa-p/12410769#M4645647</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2021-06-01T14:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Report if statement</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-report-if-statement/qaa-p/12410770#M4645648</link>
      <description>&lt;P&gt;Are you sure that the "Def Rec DT" string is in the right case and is an exact match to what's in the data?  I might also take out the "else" part of the if statement - like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if {SSLOM.SearchKey} = {IPJOBM.JOB_NUMBER} and UpperCase({SSLOM.DataItem})= "DEF REC DT" then 
  {SSLOM.AlphaValue} &lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If that doesn't work, you'll need to do some debugging.  For this, I would first take out &lt;/P&gt;&lt;P&gt;and UpperCase({SSLOM.DataItem})= "DEF REC DT"&lt;/P&gt;&lt;P&gt;and see whether the date shows up.  If it does, then there is an issue with the string comparison.  If it doesn't, then the issue is with the SearchKey/JOB_NUMBER comparison.&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 14:16:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-report-if-statement/qaa-p/12410770#M4645648</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2021-06-01T14:16:04Z</dc:date>
    </item>
  </channel>
</rss>

