Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5000 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a report that calculates the number of units per hour by dept.

The report is sorted by dept.

I have a summary field for each dept that calculates total hours worked in the dept.

QTY is the number of units that will be divided. It does not change (not a global field however)

The calculation is simple: QTY divided by that summary field.

Problem is:

Calculation will always put the result of QTY/ total hours worked by all dept together and show the same number everywhere.

The result only makes sense for report total.

CalculationError.PNG

Posted

Have a look at the GetSummary function.

GetSummary seemed to be the solution. I had already been through that.

I lost a couple hours on it only to end up with ? values.

I don't think I understand how to make it work.

It's sad because I used to make reports like this many years ago with Foxpro (SQL) and never ran into this kind of bug.

Is there another way to solve the problem ?

Posted

Why don't you post a file showing the problem? It's difficult to understand your setup, esp. this part:

QTY is the number of units that will be divided. It does not change (not a global field however)

If it's not in a global field, then where is it?

Posted

Why don't you post a file showing the problem? It's difficult to understand your setup, esp. this part:

If it's not in a global field, then where is it?

The sum of hours is in HOURS,the main table of the report

the sub-summary is by DEPARTMENT (a second table)

The field QTY is from a third table (ORDERS)

(See the attached screen capture on my first post)

I did successfully use GetSummary on another report, but the fields requested were all in the same table. That was easy.

Since I'm not English speaking, there are some technical informations that get me really confused. I'm not sure in this case what is my breakField in the formula!

Posted

See the attached screen capture on my first post

I have seen it - but it doesn't tell me anything about your setup.

the sub-summary is by DEPARTMENT (a second table)

GetSummary() will not work with a breakfield from a related table. You must use a "local" field as the breakfield (and adjust the sub-summary part and the sort order accordingly).

The field QTY is from a third table (ORDERS)

This is meaningless when we don't know what is the relationship between HOURS and ORDERS.

Posted

Case solved.

I never needed to use GetSummary in the first place.

All I had to do was add the option on the summary field '' restart when sorted by''

Then everything fell in place.

To think that I had the solution all that time just in front of my nose !!

Thanks to everyone.

Posted

No, you don't have to use GetSummary() - but it is more flexible. For example, in your case it would eliminate the need to add the extra field, and the calculation would also work in a leading sub-summary.

This topic is 5000 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.