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!

Inserting a New Group based upon formula result 1

Status
Not open for further replies.

szaunbr

Technical User
Jul 5, 2006
50
US
Hello.I am working on a report to track absences from one db into my payroll db.

The abscnece db creates a csv file that contains three columns: employee ssn, reason code, days absent.
The first db does not contain any leave balances.

The second db (an informix db via an odbc connection) contains the leave balances.

I created one report that has two grouings: the first is a grouping on the ssn, the second grouping is the reason code. I have summed the days absent and placed the sum in the group footer for second grouping. Every other section is suppressed.

The reason code from the csv file is also the pay code in my payroll db (ex: 400 reason code = sick leave which in my payroll db 400 = sick pay).

In the group 2 footer, I have inserted a formula to subtract the leave balance from the sum of days taken. If the difference is positive I know that the employee has enough days and should not be docked, therefore the reason code/pay code should remain the same.

If the difference is negative, then the employee should be docked for the amount of days the difference is negative. I would need a different reason/pay code (400 should become 600)

I hope this makes sense.
Thanks in advance.
 
First, groups are made on the basis of individual 'rows', detail lines. You can't construct a group where membership depends on summarising several detail lines or even compairing two detail lines, previous or next.

For what you're trying to do, you may not need this. If you use summary totals, the results are placed in the group footer but are also available in the group header. You could do a formula field that makes the comparison and set the 'reason code'.

Does this help?

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Yes. That did work perfectly. Thank you so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top