Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi everyone!

Firstly, I'd like to clarify that I'm not sure if this post fits in this section. If not, feel free to reallocated!

Secondly, I'm going to present my problem:

- My DB. I have a table of Clients. This table is linked to a Bills table in a 1...n relationship using the clientID. I am storing when the bill was generated.

- I'm trying to generate a report which shows a top 10 of clients for a given year. The clients should be sorted for the amount of money they spent. That amount would be generated as the sum of client's bills for the year chosen.

My main problem is how to sum the bills of a client for a given year.

Thank you in advance,

Manuel

Posted

After 56 views and no reply, I guess what I'm trying to do is not possible... Could does anyone tell me if I should discard this idea?

Posted

You need a relationship from clients to bills that includes the given year and client id. then a calc field in clients that sums the related bill totals.

Posted

Another option is to find the bills for a given year and sort them by client, reordered by a summary field. Finally - and this is the more difficult part - omit the records in group #11 and beyond. See something similar here:

http://fmforums.com/forum/topic/69793-limiting-find-to-first-5-records/

Posted

You need a relationship from clients to bills that includes the given year and client id. then a calc field in clients that sums the related bill totals.

Sorry, I don't know how to create that relationship.. I already have a relationship between them using the ClientID but I don't know how to add the year os the bill in that relationship. Would you mind being more specific?

Posted

Another option is to find the bills for a given year and sort them by client, reordered by a summary field. Finally - and this is the more difficult part - omit the records in group #11 and beyond. See something similar here: http://fmforums.com/forum/topic/69793-limiting-find-to-first-5-records/

I tried your solution and it works! thank very much!

This topic is 4642 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.