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!

Group Suppress on depending on its detail Records

Status
Not open for further replies.

nag999

Programmer
Apr 16, 2003
33
IN
Hi Everybody,

I am having a specific kind of problem.Basically I want to show only those order which have all the products quantity in that order greater then 2.If any order,which have all of its products quantity less then 1 then i need to suppress that order.

Presently Situation is as below

Order 1
Name Qty Price Points
Product1 2 $10 20
Product2 4 $10 20
Product3 2 $10 20

Order 2
Product1 1 $10 20
Product2 1 $10 20
Product4 1 $10 20

Order 3
Product1 4 $10 20
Product2 2 $10 20
Product4 2 $10 20

Actually here in above order 2 had to be suppressed since all products quantity in that order are less than 2. How shall i acheive this?

Thanks in advance.

Regards
Nagaraj(ART)
 
On Crystal 8.5, you could do it as follows:

Right-click on Qty, chose [Insert] and [Summary]. Select the Maximum for Qty.

The field will appear on the total line. But unlike a Formula Field or Running Total, a [Summary] can be tested before the group is printed, and can even be used to stop it printing.

On the [Report] menu, chose [Edit Selection Formula] and [Group]. You should find that the "Maximum for Qty" is one of the fields you can test, >= 2.

This should suppress the unwanted groups. They will unfortunately still appear on the 'tree': if anyone knows of a way to suppress this, I'd be interested to hear it.



Madawc Williams
East Anglia
Great Britain
 
PS. You can delete the "Maximum for Qty" field from the report, after you have used it in your select statement.

Madawc Williams
East Anglia
Great Britain
 
Hi Madawc,

Thanks for your reply.The doubt is Quantity is not direct field from database.It is a formula created on crystal,which will show the quantity.I tried with direct database column it is ok with that.But the same is not working when i am trying to do Maximum(@total).

How to work around this?

With Regards
Nagaraj(ART)
 
Hi Madawc,

Suppressing the Group is very cool.Just Select the Group Right Click>Format Sections>Suppress(x-2)

There you write the Formula
Maximum(QTY) >=2

which will return True for all those record which satisfy this above criteria and then the Group Suppress is done.

But Why im getting error if use the same as below.
Maximum(@total)>=2

Regards
Nagaraj(ART)
 
Perhaps you have a "WhilePrintingRecords" line in @total. If you do then you cannot perform a summary operation on the formula

Jim Broadbent
 
Hi Jim,

I dont have any code as "whilePrintingRecords" written in @Qty formula.

Regards
Nagaraj(ART)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top