I tried this formula and it gives me the wrong precentage, it is taking the
percentage by dividind each divisions Total Service Feeby only one divisions
Total Ticket Amt and I'm not sure why? The data is such
TSF Pct TTA
CORPORATE SERVICES $5.00 0.04% $339.70
FINANCE & PLANNING $10.00 0.08% $663.80
IT DEPARTMENT $5.00 0.04% $471.20
LEGAL $20.00 0.16% $272.00
LIFE & ANNUITY $25.00 0.20% $1190.00
MARKETING $540.00 4.37% $36265.27
PROPERTY & CASUALTY $265.00 2.14% $12369.82
The text boxes are all located in the group footers....PLEASE HELP IF YOU CAN
:
Hi T-bird,
try this:
=([Total Service Fees]/parent.[ETLsubrpt].[Report].[Total
Ticket Amt])
if there will be occassions when ETLsubrpt has no data or
Total Ticket Amt is 0... here is a function you can use
from Arvin's website:
'~~~~~~~~~~~~~~~
Reports: Handle Null values in fields
Author(s)
Arvin Meyer
If you're using a field as part of an expression in another
control on the report, a Null value in the field can cause
errors.
An easy way to handle such errors is to force the field to
Zero using a custom function if it contains a Null value.
For example, I use the following function:
'******** Code Start *********
Function ErrorAvoid(n As Variant) As Variant
On Error GoTo Trap
ErrorAvoid = n
Exit Function
Trap:
ErrorAvoid = 0
Resume Next
Exit Function
End Function
'******** Code End *********
Then use it in a calculated text boc
=(txtAnyField)+ErrorAvoid(Reports!RptName!SubRptName.Report!txtSubtotal)
'~~~~~~~~~~~~~~~
Warm Regards,
Crystal
Microsoft Access MVP 2006
*
Have an awesome day
remote programming and training
strive4peace2006 at yahoo.com
*
T-bird wrote:
I have two subreports, “ETLsubrpt†& “ETLsubrpt1†in a main report.
“division†groups them both. On ETLsubrpt1, I want to calculate the
percentage the airfare fee is of the division total airfare. On one subrpt, I
have my “Total ticket Amt†in the group footer as:
=Sum([TICKET AMT])
On the other subrpt I have my “Total Service Fees†in the group footer as:
=([Total Service Fees]/[Reports]![Executive Travel
Summary]![ETLsubrpt].[Report]![Total Ticket Amt])
Please help me understand what I have wrong