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

Total Count

Status
Not open for further replies.

DerbyNeal

Programmer
May 12, 2005
22
0
0
GB
Hi,

I need some help regarding total counts in Crystal 10.

I have a field called 'Status' in a table named 'Sample'.

Currently there is a formula at 'Record Selection' level which filters/returns all records equal to 'U'. This is the correct requirement (see below). There are several values held within this field.

Code:
{SAMPLE.STATUS} = 'U' and {SAMPLE.TEMPLATE} = 'XML'
and 
{@Start Date} >= {?Enter Start Date} and {@End Date} <= {?Enter End Date}

The records are grouped by another field 'Customer.Code'.

1. I need to Total the records at group footer level for all Status' not equal to 'X'

2. In a further field, at group footer level, I need to display Status' values of 'U' as a percentage of all those not equal to 'X'

Thanks in advance,
 
Totalthe records is vague enough, do you mean a sum, a count, or???

Try to use descriptive technical terms.

OK I'llassume it'sa count.

Create a Running Total, and in the evaluate->Use a Formula place:

{SAMPLE.STATUS} <> 'X'

And select for the group level.

Now create aanother one and in the evaluate->use a formula place:

{SAMPLE.STATUS} = 'U'

Now create aformula, as in:

if {#MyXRT} <> 0 then
({#MyURT}/{#MyXRT})*100 & "%"

This will handle the percentageplace it alongside the Running Toals in the group footer.

-k
 
Hi,
I may be confused ( it is Friday, after all) but, given this:
DerbyNeal said:
Currently there is a formula at 'Record Selection' level which filters/returns all records equal to 'U'. This is the correct requirement (see below)

No records would have a status other than 'U' so why test for (Not 'X')?
Also, with only 'U' records returned the % of Not X would be 100%

What did I miss?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top