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

No records message 1

Status
Not open for further replies.
Dec 2, 2003
58
US
Hi all,

I have created a report using CR10 which has one group. I want to diplay a message that says "0 Records" when the details section has no records. How can I do this? Is there a function in Crystal that I can use for this?
 
Hi,
Where do you want to display it?

You can probably create a text box with that message and suppress it if the record count is > 0





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I want to display it in the details section. I am not sure what the exact syntax would be. I do understand the logic but need help with syntax.
Thanks for your help.
 
There are a few different ways to do this, but based on where you want to place the message, this is how I would do it:

Using a field that is never NULL, first, create the formula that will display the message:
[tt]
//@NoRecords
If IsNull({Table.NonNullableField}) then
"0 Records"
Else
//This 'Else' part is optional, but not a bad practice
"";
[/tt]
Create a second Details section, make it the first Details section (DetailsA), drag the "@NoRecords" formula into it, then create a suppression formula for the DetailsA section:

[tt]Not IsNull({Table.NonNullableField})[/tt]

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top