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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Value Contains U

Status
Not open for further replies.

davismar

IS-IT--Management
Apr 1, 2010
85
US
Crystal Reports XI

I have a field name = tbl.InvoiceDetail.ItemID

What I need to do is this:

If the the above field name "contains" a "U" , I need to have the result of my formula (@TotalCOGS) * .80 for those item ID's that contain the U.

Can someone please help me write this?

Thanks!
 
if instr({tbl.InvoiceDetail.ItemID},"U")<>0 then
{@TotalCOGS} * .80 else
{@TotalCOGS}

-LB
 
lbass,

Thanks for your help.

I tried this formula and receive the following error message:

---------------------------
Crystal Reports
---------------------------
{tbl.InvoiceDetail.ItemID}

This field name is not known.
---------------------------

---------------------------

What am I doing wrong? I copied it just as you have it?

Thanks!
 
I just copied YOUR field as shown in the first thread. Use your itemID field there instead--just add it in from the field list.

-LB
 
Thank you for your quick reply.

The field name is correct, but it still doesn't work.
Could something else be wrong?

Thanks
 
Note - this field name is a "string" value.
Does that make a difference?

Thanks,
 
Sorry - it seems to be working now.
Sorry again.
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top