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

Blank data in Report... 1

Status
Not open for further replies.

Down55

Technical User
Dec 9, 2003
5
US
I'm not sure if I am putting this in the correct area, if not please advise me where to move it to.

Is there a way to create a default page to show in your report if there is no data in a certain field(s)? I'm using Crystal Reports 9.

Thanks in advance for anybody able to help!!
 
Yes
u can create a subreport and call it Blank.rpt
in there just say data is not available.
or
create a text box that has the message in it and used the format box where the supress x2 is and conditionnaly supress if is null

cheers

pg

pgtek
 
pgtek,

I understand (kinda) what you mean, but, how do you...
'conditionnaly supress if is null'??


I've only been doing Crystal progamming for 6 months ( but mainframe programming forever)

help,
alex

 
hi

Ok what do you ant to do?
A sub report? or a text box with message no data available?

pgtek
 
I have created a report in version 8.5, the report have a parameter, but if the user leave it blank the report will continue and run. How do I setup if it is blank stop or return to previous menu.?

Thanks
 
To alexfromuno

If you right-click on a section, you get options including [Format Section]. This has extra options, including suppress. And all of these can be made conditional, based on a logical test you put in the formula, the [X+2] thing.

You test
isnull({field})
when either the field is null within a record, or else there was no record and all of its fields will be seen as nulls.

I'm also a Crystal programmer with a mainframe background. Nulls are one of the things that one has to learn, and is very useful once mastered. I got clear about it using test reports to illustrate points, and then let me write productive reports much more efficiently.

Madawc Williams
East Anglia, Great Britain
 
to pgtek,

What I'd like to do is be able to, in the sub-reports, if there is no data for the given sub-report, do a line of text, in a box, that states...'No data available...'

thanks,
alex
 
I don't think a Parameter can be NULL....Crystal should prompt for value.

You should populate the parameter with a default value.

You could suppress each section except the report footer if this value isn't changed.

WhilePrintingRecords;
{?Parameter} = "Default";

in the report footer place a text message

"Parameter: ABC not entered properly"

conditionally suppress section with

WhilePrintingRecords;
{?Parameter} <> "Default";


this leaves a bad taste in my mouth though as a report should be designed to always produce a report of somekind and be able to handle bad user input.

To simply run back to a menu if the parameter is not good as the user doesn't know what they did wrong and will complain that the report doesn't want to work


Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top