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

Need to calculate percentages per employee

Status
Not open for further replies.

azoe

Technical User
Feb 21, 2005
175
US
Crystal 11, MS SQL database.

One appointment has two doctors. One is a rendering and one is a referring (two fields on one record).

Under certain conditions I need to calculate 70% of a figure for one of them and 30% for the other one.

Later I'll need to come up with a total sum for the rendering and one for the referring.

How can I do that? It seems like I would have to use a formula within a group.

If I group on my conditions and then in that group would it be best to put two formulas one for 30% and one for 70%?

If I put this formula for the 70%:
If {@The4GroupsSplit} = "Render-Refer"
Then
{dch_MonthlyPmtsWithSIMandDept;1.PaidAmt} * .7
in that group would that do it?



Thanks -
 
Seems right. Maybe
Code:
If {@The4GroupsSplit} = "Render-Refer"
Then
{dch_MonthlyPmtsWithSIMandDept;1.PaidAmt} * .7 
else
{dch_MonthlyPmtsWithSIMandDept;1.PaidAmt} * .3

You can also suppress fields and whole sections, based on formulas. Try experimenting a bit and see what Crystal gives you. This gives better results than trying to work it out in advance.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top