Hi All,
I know there is a way to do what I want, but can't find it. I feel a little stupid for not being able to find the solution myself, as I know I have seen it somewhere.
What I want to do is this:
Pull from our Jobs table all jobs with costs exceeding a certain percentage of the contract value. This is not a problem, for the individual records, until what's coming next: our jobs are split up in subjobs that are accumulated into Main Jobs. Main Job no. are numbered like 12345, subjobs are numbered typically 12345.100 an 12345.101 etcetera; Related jobs are identified by the field 'Main Job no' in the Job table.
So I want only to pull the jobs where the sum of all costs of al subjobs of a main job no. exceed a percentage of the sum of all contract values of those same subjobs.
I am posting my question here hoping to be able to quickly get on with my report…….. I know the answer is right in front of me and I can't see it :shock:
Thanks in advance
Willem
Date
Votes
1 comment
-
Jet Reports Historic Posts Hi Willem,
I think you are going to want to use the "Sort by Sum" functionality. It sounds like you need to get a total of all the sub jobs and then test that against a value. I have included some links to some other topics on this site that should help.
To learn how to use Sort by Sum:
Most effective way to teach sort by SUM
http://community.jetreports.com/viewtopic.php?f=23&t=2109&p=10475&hilit=sort+by+sum#p10475
To compare the result to a value/number (please ignore the limit=):
Top 10 Customers by Item
http://community.jetreports.com/viewtopic.php?f=7&t=2960&p=9077&hilit=sort+by+sum#p9077
I hope this helps!
Please sign in to leave a comment.