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!

Summary Function on Non-Recurring Field 1

Status
Not open for further replies.

starflt1701

Technical User
Jun 4, 2001
25
US
Can't get around this one.

I am creating an on-time delivery performance report for my Purchasing Department. They receive large quantities of goods which can, and frequently do, take several days to receive over multiple shipments. It is my job to determine if, at some point over those shipments, the order can be considered received and complete on time.

I have created a report in ver. 5 (it's all we have), which details all the receiving activity (quantities and dates) grouped by PO number. Next to the quantities received, I have created a running total field. Then I have created a formula, which I called "Score" to determine if, based on the running total at that point, and the received date, the order is "on time". If the particular shipment meets the criteria, my formula assigns a value of 1. 0 if it doesn't. It is my intent to sum the 1s and 0s of these orders and divide by the total number of orders to get a simple percentage. All the above works just fine until I try to perform a summary function on the
"Score" formula. I get the error message that I cannot perform a summary function on a non-recurring field. Any ideas how to get around this?

Thanks,
 
Can't you duplicate the formula, but adding rather than setting a value?

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Can you give me an idea of what that might look like? Will I then be able to perform a summary function on the formula? I'm outside of my comfort zone on this one, so the more specific the help the better. Thanks.
 
I think what madawc is eluding to is to change your formula to use shared variables to accumulate the summary rather than just setting the value

i.e.
//@AccumScore
WhilePrintingRecords;

Shared NumberVar Score;

If (Place score logic here then
Score := Score + 1;

Score

then create a 2nd formula to display the total score
//@Display
WhilePrintingRecords;
Shared NumberVar Score;

I'm not sure where Crystal was in respect of using variables in your version, so I don't know if all of this supported.

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
Thanks for laying it out for me. I'll let you know how this works.
 
OK. I created the formulas as you stated. Put the @AccumScore formula in the details section and the @Display in the group footer. All seem to work well, in that the @Display actually displays the right value for the order based on the criteria. However, I still cannot perform a summary function on the @Display field. Keep getting the same error message about summary function on a non-recurring field. I'm beginning to think there is no solution to this one.
 
Please share the contents of {@score} and explain where it is located--detail? Group footer?

-LB
 
Hey all. I played around with the "whileprintingrecords" function over the long weekend and got it to do what I wanted. It's a thing of beauty! Thanks for your suggestions and inspiration.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top