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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with a Group Selection

Status
Not open for further replies.

mtepfer

IS-IT--Management
Apr 21, 2003
55
0
0
US
Am using Crystal XI,

Have a group on a clientid, within that client am listing different sources of income for them, could have zero to multiple codes and also duplicate codes.

Want to display based on one code, in this instance "c" but also only display if this is the only amount. I am able to display only those records that include "c" but want to display those records where "c" is the only income code for that person.

Example data would be

CLient Total Income
x 1000
Client Detail
Name Income Code Amount
x c 500.00
x c 500.00


Client Total Income
y 1000
Client Detail
Name Income Code Amount
y a 250
y c 500
y g 250

In the above examples only client x should be displayed, as i have it now it will show client x but it also shows the one line for client Y which i do not want. Am trying to also base it on the sum of amount = to total amount but can't get it to work. Any ideas or suggestions are appreciated.
 
What does "sum of amount = to total amount" mean?

Why would client Y be excluded? Why don't you post the actual formula you are now using, instead of trying to explain it?



Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
There is a field for Total Income and then a detail field for the Amount based on the income code, i am trying to get it to select those groups base on the sum of the detail for 'C' if it equals the total.

Here is what i am trying to do but am getting a "group condition is not allowed" error on the cond part of the sum statement. I do have a grouping on the sinccode7b field and am just trying to sum those items.

If {?Inc1} = "Child Support" then (({Command.TotalEarnedIncome}) <= Sum ({Command.dIncome6e7d},{Command.sIncCode7b},'c') and {Command.sIncCode7b} = 'c')

Client 'Y' would be excluded because they have other income codes other than 'c'. "c" must be the only income code for that person in order for them to be shown.

Hope this helps clear things up a little
 
Never mind got it, read that the sum function cond does not work except for date, time and boolean, but was able toget the desired results using the following command :

If {?Inc1} = "Child Support" then
(({Command.TotalEarnedIncome}) <= Sum ({Command.dIncome6e7d},{Command.sIncCode7b}) and {Command.sIncCode7b} = 'c')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top