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

Formula to check for no returned records?

Status
Not open for further replies.

mbeech

MIS
Nov 22, 2005
7
0
0
US
In CR 10, instead of receiving an "empty" report when there are no records returned, I would like to know if there is a formula I could write that will print something on the report (e.g. "No Sales for Month") even when there are no returned records for a report.
 
Please see thread767-1160632.

-LB
 
This is often accomplished by creating a seperate Report Header, which is conditionally suppressed based on whatever criteria works for determinging that no rows were returned. Be careful about using recordnumber as you may find it shows 1 when there are none with some databases.

You might check for a field that could never be null, as with LB's example in the referenced thread.

You can also have Crystal not display the report at all when no rows are returned by selecting the File->Report Options->Suppress Printing if No Records Selected.

-k
 
Thank you for the response. My scheduling software requires that a report instance (with at lease one record) be created before it will replace the old report instance. Is there a crystal formula that will return one record for a report, even though no records from the database have been selected due to the parameter? Will recordnumber work?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top