Question

I am using an if-then conditional in a Crystal Reports formula. I want to display just one record in report based on the results of the conditional. For example:

if(....)="H" then "Habbits" or if(.....)="I" then "Indoor"

How can I achieve this?

Was it helpful?

Solution

I think you need to show data like Habbit, Indoor etc based on condition. Follow these steps If I am correct in guessing the question:

  1. Create a new formula field, and add the condition in the same.

    stringvar nameofvar:="";
    if(....)="H" then nameofvar:="Habbits" 
    else if(.....)="I" then nameofvar:="Indoor"
    
    //If there is a problem in this formula then specify 
    
  2. Drag the formula field from field explorer to the area on the report where you want it to show.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top