Formula needed to show 'Title' or 'Title & Title'

Options
Hi, I am creating a report which looks at participants attending an event. I would like the report to show Participant and Guest of information. Can anyone help me work out a formula if I want to show the Title of the Participant but if they have a guest of to include that as a double title. So something like IF Title = Title then show Title OR If Title and Guest of Title then {Title }+" & "+{Guest of Title} I hope this makes sense. I am new to Crystal Report so any help would be appreciated. Thanks, Ryan
Tagged:

Comments

  • Ryan Abbott:
    Hi, I am creating a report which looks at participants attending an event. I would like the report to show Participant and Guest of information. Can anyone help me work out a formula if I want to show the Title of the Participant but if they have a guest of to include that as a double title. So something like IF Title = Title then show Title OR If Title and Guest of Title then {Title }+" & "+{Guest of Title} I hope this makes sense. I am new to Crystal Report so any help would be appreciated. Thanks, Ryan
    So you mean like, if Kanye West is coming to your event, and Kim Kardashian is his guest, you want Kanye's listing to read "Mr. and Ms.'?
  • James Andrews:
    So you mean like, if Kanye West is coming to your event, and Kim Kardashian is his guest, you want Kanye's listing to read "Mr. and Ms.'?
    Haha!! That's correct! But if Jay-Z arrives without Beyonce I want the title field to just show Mr.
  • Marie Stark
    Marie Stark ✭✭✭✭✭
    Ancient Membership Facilitator 3 Name Dropper Photogenic
    Ryan Abbott:
    Haha!! That's correct! But if Jay-Z arrives without Beyonce I want the title field to just show Mr.

    You could say something like

    if {Guest of Title } = ' ' then  {Title} else {Title} + "&" + {Guest of Title}

     

     

  • Ryan Abbott:
    Haha!! That's correct! But if Jay-Z arrives without Beyonce I want the title field to just show Mr.
    You know, this is harder than it would first appear, because you're basically trying to test if something is there, in a separate outer-joined table.

    I think the only way to do it is through a variable that loops through the guest records, looking at the participant guest link in the guest table, and returning the guest title if it's there.

Categories