Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: A Better Way? Post Reply Post New Topic
Author Message
yeller
Newbie
Newbie
Avatar

Joined: 06 Feb 2014
Online Status: Offline
Posts: 12
Quote yeller Replybullet Topic: A Better Way?
    Posted: 03 Aug 2015 at 10:04am
Does anyone know of a better way of writing this formula? It works so far in Crystal with 5 flowers, but I have an additional 84 flowers to add.

if {Flowers.Annual} = "Tulip" then "Daisy" else
if {Flowers.Annual} = "Rose" then "Daisy" else
if {Flowers.Annual} = "Aster" then "Daisy" else
if {Flowers.Annual} = "Dahlia" then "Daisy" else
if {Flowers.Annual} = "Iris" then "Daisy"
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Aug 2015 at 11:28am
I would much prefer to use a table that does the translation and just link to it. That way you are updating the table with new records as needed and not needing to edit the report.
here is another possibility but it may not help you if your 'Daisy' Result was not expected for all of your values

if {Flowers.annual} in ["Tulip","Rose","Aster","Dahlia","Iris"] then "Daisy" else "whatever here"
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.