Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Crystal Report Formula Post Reply Post New Topic
Author Message
BI_World
Newbie
Newbie


Joined: 31 Jul 2013
Online Status: Offline
Posts: 1
Quote BI_World Replybullet Topic: Crystal Report Formula
    Posted: 31 Jul 2013 at 10:34am
Hi ,

I have crystal report formula.can you please help to what is logic for it and how it is works ?

PLease note : The code have varchar(10) datatype.

if {Code} in ['042' to '04299'] then "ABC" else
if {Code} in ['V08' to 'V0899'] then "ABC" else

if {Code} in ['140' to '23999'] then "CBS" else
if {Code} in ['V10' to 'V1099'] then "CBS" else
if {Code} in ['V16' to 'V1699'] then "CBS" else
if {Code} in ['V58' to 'V5812'] then "CBS" else
if {Code} in ['740' to '75999'] then "CBS" else

if {Code} in ['760' to '77999'] then "BBC" else
if {Code} in ['7793' to '7793'] then "BBC" else
if {Code} in ['77984' to '77984'] then "BBC" else
if {Code} in ['V20' to 'V3999'] then "BBC" else


if {Code} in ['940' to '94999'] then "NEWS" else

if {Code} = ['430' to '438'] then "NEW NEWS" else

if {Code} = ['3400' to '3449'] then "ARTICLE" else

if {Code} = ['800' to '829'] then "WHITE PAPER" else

if {Code} = ['570' to '573'] then "RESEARCH PAPER" else
if {Code} = ['8640' to '86419'] then "RESEARCH PAPER" else
if {Code} = ['V427' to 'V427'] then "RESEARCH PAPER" else
if {Code} = ['75162' to '75162'] then "RESEARCH PAPER" else
if {Code} = ['V596' to 'V596'] then "RESEARCH PAPER" else
"Not Reportable"

Thanks in advance
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Jul 2013 at 12:05pm
it is switching your "code" field from an alpha numeric value to a strings of ABC, CBS, BBC etc.
 
That being said I would question the use of a range on a string.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.