Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2016 : Report Design
Message Icon Topic: Create List in Formulas Post Reply Post New Topic
Author Message
anoble1
Newbie
Newbie
Avatar

Joined: 02 Oct 2015
Location: United States
Online Status: Offline
Posts: 4
Quote anoble1 Replybullet Topic: Create List in Formulas
    Posted: 07 Aug 2019 at 10:46am
How can i create a list in the Formulas area?
For instance.
If ZIP codes are [35452,24785,95742,74565] Then "Chambers" County
else if [45844,58745,35471] then "asdf County" ETC.

How do I write that?

I have about 50 zip codes that I am going to compress together by county and list the County on a Group Header to group all the zips for that one county all the way down.
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 10 Aug 2019 at 12:17am
HI

Your question is having the answer, only thing is need to use correct syntax:

If {zipcodefile} in ['35452','24785','95742','74565'] Then "Chambers"
Else
If {zipcodefile} in ['45844','58745','35471'] Then 'ASDF'
Else
If .. so on..

Since zip code filed always be in string data type you need to put them in single /double cots.

Insert group on above formula to group all related countries.



Edited by Sastry - 10 Aug 2019 at 12:18am
Thanks,
Sastry
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.035 seconds.