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!

Suppress a Section if no records exists in sub report.

Status
Not open for further replies.

umeshs79

Programmer
Aug 7, 2002
42
DE
Hi,
I make Customer report which contains sub report of items related to the customer.
Layout is as follow:

Customer ID Name Address
-------------------------------------
00001 Jon XYZ

Item Qty.-> Comes from subreport.
------------------------
Item1 5
Item2 10

00002 Methew ABC

Item Qty.-> Comes from subreport.
------------------------
No item exist for this customer.

Now my problem is that if there is no item for a particular cusomter i want to supress the Item Header in sub report. As in 2nd record of customer only Item Header is printed

So please tell me how i suppres the Item header in sub report if there is no item for that particular customer.

I have tried in Supress option
if Count({Item.itemID}) = then
true
else
false

but this does not work, because there are items in item table but there is no item for given customer.
So please tell how it do it?

Thanks.
Umesh

 
Another way is to go to "File\Report Options" in your Subreport
and select the option "Suppress Printing If No Records"

/Goran
 
Hi Goran,
I am using Crystal.NET reports. So there no "Suppress Printing If No Records" in Report Options dialog box. So is there anywhere else such option from where i can supress the subreport.

Thanks
Umesh Sharma,MCSD
India
 
Hi Umesh !

Unfortunately I don´t know anything about Crystal.NET reports.
But if you take your own suppress idea and use the "IsNull function" I think it will work.

if isNull({Item.itemID})then
true
else
false
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top