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

Crystal Report only showing first row of table

Status
Not open for further replies.

gosche15

IS-IT--Management
Sep 12, 2013
1
US
We have 3rd party software that has a SQL database and we use crystal reports for reporting. The way their software is setup, leaves an audit trail, so when a record is deleted it doesn't remove it from the database, it just gives it a "1" under the deleted column for that particular table. So for our report, we want to show the carrier a shipment is being taken by, it will only look at the first row in the database even though it has a 1 as deleted when we would want the first or all choices that have a 0 as deleted. I created an IF statement kind of like this:

If deleted = 0 Then
column data
Else
"text"

But it will only look at that first row and then go to the else. We have a particular one that the carrier was deleted twice and a third added in so basically first two rows have a deleted column = 1 as being deleted and the third a 0 as not deleted but my If statement only sees that first row is deleted and goes directly to the else. Is there an easy way to change my if statement that it will throw some kind of loop to check all rows?
 
Some additional information while you are answering pmax9999. How to you retrieve data from the database? A SQL statement or a table as a data source to list two examples? The IF statement in your question is not a valid Crystal formula can you copy and paste the Crystal formula into the thread?

PeteS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top