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

Showing a Group only if all the inside records satisfy a condition 1

Status
Not open for further replies.

kambike

Programmer
Jul 24, 2001
12
0
0
US
Hi,

I want to show a group only if the records within it satisfy a condition. The condition is based on a Formula field of running total. How to do this? This condition is evaluated for each record. So if 4 out of 10 record in the group satisfy the condition, they are displayed with the group header. The records 5 onwards, including footer are supressed. But I want to show the group only if all the 10 records satisfy the condition. Is it possible?

Regards,
KA
 
Hi,

Create another formula

if (field_condition} then 0 else 1

Add summary of the formula for the required group

Suppress group if summary <> 0


Hope this helps

Geoff
 
The problem is that you are using a running total. As long as you are using a running total you have missed your opportunity to suppress the group. You may be able to do the same thing without the running total, which would allow you to use the FoxG technique. What are doing in the running total? Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Hi,

I want to print a report that will give me top customers contributing to X% of the total sales ans the relevant Items. X is an input parameter. So I use a running total field that calculated the running percentage. When the running percentage total exceeds the X value I want to suppress the groups. Currently, if the contion fails when a group is in progress, it suppress all the successive records and the footer, but the previous detail records for the group and the header is displayed. Is there any way to suppress such a group, if some of the detail records fail to satisfy the condition?

Regards,
KA
 
If you can use a running total using variables, you can evaluate the entire group at once, rather then record by record, by using the subtotal while still in the header of each group. This allows you to evaluate the effect of the group before the details appear. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top