Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: NOT Post Reply Post New Topic
Author Message
OneShoe
Newbie
Newbie


Joined: 12 Jan 2012
Location: United States
Online Status: Offline
Posts: 5
Quote OneShoe Replybullet Topic: NOT
     Posted: 15 Jan 2012 at 5:15am

I am trying to find customer sites that have not had a battery replaced.

I added NOT ({IN_Part.Description} like "*Battery*") to the Select group.

The problem I am having is that the sites which had a battery replaced are still showing up on the  report.  However the detail does not show the battery record.

So if I ran a report without the NOT and any selection criteria for battery then all sites will be listed and the records for battery would be listed in the detail for sites that had a battery replaced. 

Or I run the report with  {IN_Part.Description} like "*Battery* then only site with a battery replaced show up.

But the NOT does not just only show sites where a battery was not replaced.

What am I missing?






Edited by OneShoe - 18 Jan 2012 at 10:01am
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 18 Jan 2012 at 11:21pm

I'm assuming you've grouped by site?

You're only excluding records that contain battery in the description, not groups.
 
First of all create a formula as follows (for examples sake we'll call the formula "Battery";
 
if IN_Part.description like "*battery*" then 1 else 0
 
Now, goto Report > Selection Formulas > Group...
 
A new formula dialogue box will appear, in there enter the following formula;
 
 
Obviously replace the field names with those relevant to your table. Then only sites without a battery record should be displayed.
 
Regards,
Ryan


Edited by rkrowland - 18 Jan 2012 at 11:53pm
IP IP Logged
OneShoe
Newbie
Newbie


Joined: 12 Jan 2012
Location: United States
Online Status: Offline
Posts: 5
Quote OneShoe Replybullet Posted: 19 Jan 2012 at 3:14am
It worked.

Thank you!SmileSmile
IP IP Logged
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