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

Reports With No Records

Status
Not open for further replies.

OzzieOwl

Technical User
Joined
Dec 13, 2001
Messages
45
Location
GB
I am creating reports for non technical users, does anyone know how to get Crystal to flag up "No Records on Search" if the report returns nil records ?????

Thanks in Advance

Martin

 
Hi !

You can place a formula like this one in the Report Footer:

if isNull(Count ({id.field})) then
'No Records on Search'

/Goran
 
You can do this by inserting a text object which displays 'No Records Found'. You can then conditionally suppress this text object when the report does return records.

To display 'No Records Found' for reports with no records:

1. On the Insert menu, click 'Text Object'.

2. Type "No Records Found" in the text object, then press Enter. Move this text object so the message is in a prominent position.

3. Right-click the text object, and click 'Format Field'.

4. Go to the Common tab, and click 'X+2' beside the 'Suppress' check box. This opens the Conditional Formatting Formula Editor.

5. Type this formula:

Not(Isnull(Count({Table.Field}))) or
Count({Table.Field}) > 0

//Replace {Table.Field} with
//any database field in your report

· Check and save this formula.

· Click 'OK' to return to the report.

The next time you refresh a report that returns zero records, you will see a 'No Records Found' message.
Suppress page header on the last page
HTH
Bryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top