Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change data in a field based on certain criteria 1

Status
Not open for further replies.

Forest75

Technical User
Apr 13, 2011
8
GB
Hi,

Using Crystal 2008 is it possible to change the data in a specific field based on data in other fields?

If I haven't explained that well my example is this:

Fleet No. Date Serv Type AM/PM
001115 28/09/11 AAA PM
001115 28/09/11 ABI PM
002120 29/09/11 AAA PM
002120 29/09/11 ABJ PM
002120 29/09/11 MOT AM
003500 29/09/11 AAC PM
003500 29/09/11 BBB PM

What I wish to do is, if a vehicle is due to have a MOT Serv Type on a particular day I wish to make all the other events relating to that Fleet No read AM in the AM/PM field.

Any ideas or help will be gratefully received.

 
Insert a group on fleetno. Then create a formula:

//{@MOT}:
if {table.servtype} = "MOT" then
1

Then create a second formula to use in place of the AM/PM field:

//{@AMPM}:
if sum({@MOT},{table.fleetno}) <> 0 then
"AM" else
{table.AM/PM}

-LB
 
Brilliant, thats sorted it. Thanks very much.

MS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top