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

[b]Do not include items ending in S[/b] 1

Status
Not open for further replies.

blueboyz

Technical User
Sep 13, 2005
210
US
I am using Crystal Reports v9. I am trying to create a report that doesn't include items that end in "S".

For example, I have items 2018, 2018d, 2018S, 2036S, 21086S. I do not want to include 2018S, 2036S or 21086S.

I created a formula: called {@S}
Right({LineItem.ItemID},1) = "S"

In my select records formula, I have
{LineItem.ItemID}<> "{@S}"

However, items that end in "S" are still displaying on the report.
 
Probably space padded fields, try this inb your record selection:

Right(trim({LineItem.ItemID}),1) <> "S"

Don't reference another formula.

Questionable whether this will pass to the database, but since you didn't share what type and version, I guess you don't care. If so, create a SQL Expression to trim the field and then use a similar formula in the record selection.


You can verify what's in the query by checking Database->Show SQL Query.

-k



-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top