Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: How to omit a type of string Post Reply Post New Topic
Author Message
korigirl
Newbie
Newbie
Avatar

Joined: 26 Jan 2015
Online Status: Offline
Posts: 3
Quote korigirl Replybullet Topic: How to omit a type of string
    Posted: 24 Feb 2015 at 8:40am
Newbie here, sorry!

I have a database where one field (Participant Phone Number) produces three outputs: Home, Cellular, E-mail (but it actually displays the number or address). There's another field (Participant Phone Type) that tells me which of those three it is.

In my Crystal Report, I only want to display the Home or Cellular and omit the E-mail altogether.

I played around with If/Then statements but could not produce what I wanted.

I also tried suppressing the E-mail "Participant Phone Type", but it doesn't remove the entire line of data, it just leaves that field blank.

Any tips?
IP IP Logged
korigirl
Newbie
Newbie
Avatar

Joined: 26 Jan 2015
Online Status: Offline
Posts: 3
Quote korigirl Replybullet Posted: 24 Feb 2015 at 8:46am
As a follow up, in my mind, this is what I think I need:

If Phone Type = Home or Cellular, Then Display Participant Phone Number, Else Don't display that row [there are other fields on that row]

I'm just not versed in Crystal speak enough to figure out how to produce that

Edited by korigirl - 24 Feb 2015 at 8:49am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Feb 2015 at 10:16am
if you use the select expert you can omit the rows from the report
the select expert expects a True/False evaluation of each row.
True keeps the row, False excludes the row.
example:
{table.phonetype} in ["Home","Cellular"]
IP IP Logged
korigirl
Newbie
Newbie
Avatar

Joined: 26 Jan 2015
Online Status: Offline
Posts: 3
Quote korigirl Replybullet Posted: 24 Feb 2015 at 10:40am
@DBlank, thank you. I just figured out another way, although I'm not sure if it would work every time.

I ended up displaying the Participant Phone Type, used the Select Expert to choose only Home or Cellular, then used Display string to show the Participant Phone Number.

It worked exactly how I need it to. I would delete this thread but might as well leave it up for anyone else to see if they have a similar issue.

Thanks again!
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.031 seconds.