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

Printing Message on the report when no data returned by the Report 1

Status
Not open for further replies.

Hm786

Programmer
Apr 5, 2001
88
0
0
US
Hi,

I am trying to accomplish that when no data is returned by the crystal report, then I need to see a message saying "No data returned by the report'. I checked, the check box "suppress printing if no records" in the report options menu. I am getting just a blank page but I need to see a message so that users will understand that data is not returned by that report. Can anyone please help me how to get a message in the crystal report.

Thanks,
Hamida
 
1) Create a Text Object with the appropriate text.
2) Decide what data field is to be the primary data field.

Example: Your report displays all book titles by Author - Author is the primary field.

3) Conditionally suppress your text object (or the Report Section if the text object is the only object in it) with
Not IsNull({tablename.fieldname})

If your primary field has any returned values then your text box will be suppressed. If no data is returned, then your message will be displayed.

I use this all the time as it is a standard requirement on most of my reports.
 
Thank you for your help I am able to get the message when there are no records by using your formula, but stilll I am not able to hide the page headers and group headers. Is there a way where I can see just the message and not other things on the report when there are no records returned by the report.


Thanks,
Hamida
 
Create a formula and hide page header and group header using the formula.
 
Can you let me know what formula I need to create to hide the page headers and group headers.


Thanks,
hamida
 
Conditionally suppress your section with
Not IsNull({tablename.fieldname})

Remember to use a field that never has null values in it, such as primary key field. Otherwise you could get this suppression happening when you actually get records returned but the first field value is null.
Malcolm Wynden
Authorized Crystal Engineer
malcolm@wynden.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top