Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How To detect that the report is empty & display a Post Reply Post New Topic
Author Message
pragya
Newbie
Newbie


Joined: 26 Apr 2007
Location: India
Online Status: Offline
Posts: 1
Quote pragya Replybullet Topic: How To detect that the report is empty & display a
    Posted: 26 Apr 2007 at 8:28pm
Hello All,
 
i am very new to Crystal Report ...
I have used formula in my report & it gets generated dynamically at run time ...
Sometimes it does not select any row means the Query results as a null.
Now I have to detect & display appropriate message box when the report is empty...
 
Please help me I need a resolution ASAP ...
 
Thanks,
Pragya
IP IP Logged
RobV
Newbie
Newbie
Avatar

Joined: 26 Apr 2007
Location: United Kingdom
Online Status: Offline
Posts: 13
Quote RobV Replybullet Posted: 27 Apr 2007 at 5:24am
Hello,
 
Can you please post details of any formulas, parameters and the fields used within the report.
 
Cheers
 
RobV


Edited by RobV - 27 Apr 2007 at 5:28am
IP IP Logged
peter
Groupie
Groupie


Joined: 08 Apr 2007
Location: United States
Online Status: Offline
Posts: 51
Quote peter Replybullet Posted: 27 Apr 2007 at 10:14am
Hi,
Did you find out how to do this ?
I have the same requirement.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 27 Apr 2007 at 10:27am
I don't know of any way to show a message box if there is no data.  However, we have a standard "No Data Found" message on the report itself if there is no data in the query.
 
This message is put in its own section (usually in a first group header section) with a suppress formula of:
 
not IsNull({table.keyfield})
 
This formula looks at a key field from the report's tables and suppresses the section if there is data in the field.  All of the other other sections on the report have either "Suppress Blank Section" turned on (if there is only data in the section) or, when there's text in the section, a suppress formula of:
 
IsNull({table.keyfield})
 
The only other way around this I can think of is through writing an application which will run the query internally, populate a data set with it, display a message if there is no data or run the report if there is data.
 
-Dell
 
IP IP Logged
peter
Groupie
Groupie


Joined: 08 Apr 2007
Location: United States
Online Status: Offline
Posts: 51
Quote peter Replybullet Posted: 27 Apr 2007 at 12:05pm
Thank you.
I created a simple formula:
if {0RTotal} = 0 then
   "No Data Found"
else
   ""
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.