Crystal Reports: Count on Conditional on a Sum of Group
Co-worker needs a count of items which have an average below a threshhold.
I'm wracking my brain to no avail. In the back of my mind, I'm hearing that you can't do conditionals on aggregates, and therefore, we can't aggregate the conditionals.
Description is: Given multiple outage times for different objects in (specific months), Calculate availability. With Availability, get a count of those objects not meeting threshhold.
OK, sounds simple to me, but my conditions don't, and therefore my count won't.
Currently, she has:
Group by Month
Group by Object
Records of outage events, in seconds
Sum (outage, object) in seconds
availability = (sec. in month - sum(sec. of outage) ) / (sec. in month)
From here, she would like a count of those objects w/ availability below a threshhold. The conditions don't render against a summary field -- which, in a way makes sen开发者_如何学Pythonse. CR has to pull back all records to get summaries in a second pass, and it would require a third pass to do logic (and counts) against the summaries.
I'm getting nowhere. Any ideas? We might be torqued on this one.
I can't say this very often, but you're actually a little too specific. Here's what I understand:
Your crystal report is grouped by month, then object. You have a numeric field you want to sum (let's called it
{outage}
). You then want to sum{outage}
and then do some calculations on the sum.To do this in each group footer, use
Sum({Outage},{Object})
. Make sure to put this formula (and any other formulas that are dependent on it) in the group footer.To do this in the report footer, use
Sum({Outage})
. Make sure to put this formula (and any other formulas that are dependent on it) in the report footer.
Do this help? Am I missing anything?
精彩评论