Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Help with If statements w/ multiple tables Post Reply Post New Topic
Author Message
bullsfan03
Newbie
Newbie


Joined: 12 Jul 2012
Online Status: Offline
Posts: 5
Quote bullsfan03 Replybullet Topic: Help with If statements w/ multiple tables
    Posted: 12 Sep 2012 at 6:13am
Currently struggling using Crystal Reports formulas. Unfamiliar with the syntax

Anyways I'm making a report that pulls Codes from 2 different tables for an EEO form. Some employees are assigned "Jobs" and others are assigned "Positions" so they are stored in different tables.

The EEO Code in the Jobs table is "eeo_sub_code". These codes are just the Digits 2-9.

The EEO Code in the Positions Table is "position_group_code". These codes are EEO2...EEO9.
I want them all displayed as EEO2....EEO9

jobs.eeo_sub_code and positions.position_group_code essentially contain the same info that I need to grab. Both contain EEO codes, I'm just trying to merge them into 1 column in my report.

This is what I have so far... it's only displaying the jobs.eeo_sub_code condition

if {jobs.eeo_sub_code} = '2' OR {positions.position_group_code} = 'EEO2' then 'EEO2'
else if {jobs.eeo_sub_code} = '3' OR {positions.position_group_code} = 'EEO3' then 'EEO3'
else if {jobs.eeo_sub_code} = '4' OR {positions.position_group_code} = 'EEO4' then 'EEO4'
else if {jobs.eeo_sub_code} = '5' OR {positions.position_group_code} = 'EEO5' then 'EEO5'
else if {jobs.eeo_sub_code} = '6' OR {positions.position_group_code} = 'EEO6' then 'EEO6'
else if {jobs.eeo_sub_code} = '7' OR {positions.position_group_code} = 'EEO7' then 'EEO7'
else if {jobs.eeo_sub_code} = '8' OR {positions.position_group_code} = 'EEO8' then 'EEO8'
else if {jobs.eeo_sub_code} = '9' OR {positions.position_group_code} = 'EEO9' then 'EEO9'

Any help is appreciated

Edited by bullsfan03 - 12 Sep 2012 at 6:22am
IP IP Logged
shanth
Groupie
Groupie


Joined: 06 Aug 2012
Location: United States
Online Status: Offline
Posts: 75
Quote shanth Replybullet Posted: 12 Sep 2012 at 11:59am
You are trying to place the whole thing in a formula and show it as a column data, right?
Most of your explanation is clear, but can you explain:  'it's only displaying the jobs.eeo_sub_code condition" - what condition? where it displaying? what is it?
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.017 seconds.