Crystal Report formula question

I think you need more parenthesis!  I'm not 100% certain I follow your logic, but I believe I do, and if I do, you need more ()!

Try this:

{Company.Company} = "FSI" and
(
{Customer.CustID} in ["F-FLCO", "F-HURL", "F-NIKE"] OR
 ({Customer.CustID} = "F-DISP" AND {Part.PartDescription} like ["smoke gray"])
) AND
{InvcHead.InvoiceDate} >= {?StartDate} AND
{InvcHead.InvoiceDate} <= {?EndDate} AND
{Part.ClassID}<>"TOOL" AND
{Part.ClassID}<>"MAST" AND
{Part.ClassID}<>"MOLD"
I'm trying to make a report for all of customer "CAR" (i.e F-car1, F-car2, etc.) and I would like to include all part numbers for that report. That section of it I've got.
Now I want to add F-DISP, but only when the part description contains "smoke gray." How do I make sure all CAR's are included, but only certain F-Dis are included. This is what i have so far, but Crystal reports is not taking into account the part of the formula i hae "+++" surrounding. It just ignores that part of it and only gives me data for the CAR customers

{Company.Company} = "FSI" and
{Customer.CustID} in ["F-FLCO", "F-HURL", "F-NIKE"] OR
++++ ({Customer.CustID} = "F-DISP" AND {Part.PartDescription} like ["smoke gray"]) AND ++++
{InvcHead.InvoiceDate} >= {?StartDate} AND
{InvcHead.InvoiceDate} <= {?EndDate} AND
{Part.ClassID}<>"TOOL" AND
{Part.ClassID}<>"MAST" AND
{Part.ClassID}<>"MOLD"

Sometimes when I have problem with filtering Crystal or  even a BAQ  when there are too many if, and’s, etc.

 

I go back to the BAQ (I am not sure if you are using SQL or a BAQ) and created a calculated field.

 

You could create a calculated field where-

 

IF {Customer.CustID} in ["F-FLCO", "F-HURL", "F-NIKE"] OR
++++ ({Customer.CustID} = "F-DISP" AND {Part.PartDescription} like ["smoke gray"]) then ‘Include’

Else ‘’

 

Then you only need to filter on calculated field  where the value is ‘Include’ and your filter in Crystal is simplier.

 

There are many ways to do one thing – maybe someone has a different suggestion.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of clederer@...
Sent: Wednesday, October 23, 2013 1:27 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Crystal Report formula question

 

 

I'm trying to make a report for all of customer "CAR" (i.e F-car1, F-car2, etc.) and I would like to include all part numbers for that report. That section of it I've got.
Now I want to add F-DISP, but only when the part description contains "smoke gray." How do I make sure all CAR's are included, but only certain F-Dis are included. This is what i have so far, but Crystal reports is not taking into account the part of the formula i hae "+++" surrounding. It just ignores that part of it and only gives me data for the CAR customers

{Company.Company} = "FSI" and
{Customer.CustID} in ["F-FLCO", "F-HURL", "F-NIKE"] OR
++++ ({Customer.CustID} = "F-DISP" AND {Part.PartDescription} like ["smoke gray"]) AND ++++
{InvcHead.InvoiceDate} >= {?StartDate} AND
{InvcHead.InvoiceDate} <= {?EndDate} AND
{Part.ClassID}<>"TOOL" AND
{Part.ClassID}<>"MAST" AND
{Part.ClassID}<>"MOLD"