• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1333
  • Last Modified:

Crystal Reports - Formula to find a certain value

I need to search through a data column to see if a specific value exists.  If it does i need my formula to display true.  If the value does not exist i need it to display false.  I want to display this in my Page Header.
0
jnikodym
Asked:
jnikodym
  • 2
  • 2
1 Solution
 
mlmccCommented:
Are you trying to see if that value is on that page or in the report?

If in the report try this

Create a formula
Name - HasMyValue
If {YourFIeld} = YourValue then
    1
Else
    0

Open in new window


Create another formula to display in the page header
Sum({@HasMyValue}) > 0

Open in new window


mlmcc
0
 
jnikodymAuthor Commented:
I'm trying to determine if that value exists once the report has run with the parameter selected.  I don't have the value in my report.  So, say there is a column in my dataset called City.  I won't to search all the values in that column and determine if the  city St. Louis exists in the column.  If it does, return true, if not, return false.
0
 
mlmccCommented:
That pair of formulas will do what you want.  

Did you try it?

mlmcc
0
 
jnikodymAuthor Commented:
that works, thank you
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now