Z
znibk
Marshal,
Your answer to Margaret on 10/17/04 was so well explained, I hope you can
help me out. I’ve been trying for over three weeks to find the solution to
this problem: the Ending Balance of a report with two subreports.
I have the Beginning Balance and the two subreports in the Detail Section of
the Main Report: rpt_AFinancialStmt. I know that I have to add the beginning
balance, the total income together and subtract the total expenses to obtain
the ending balance.
I put an unbound text box in the Detail Section below the SubRpt_AInc in
which I put [ABegBal]+[ATotInc]. I received a post from Duane stating I
needed to have the name of the report and “txtIncomeSum†or “txtExpenseSumâ€
as the Control Source in an unbound text box. I worked with him but have no
end result and I have not heard from him in several days.
I was reading other posts and found the one mentioned above from Margaret,
Calucating Rpt/SubRpt, 10/17/04 and decided I’d post my question with your
name and hopefully you would see it and be able to help me reach achieve an
Ending Balance.
Not fully understanding your post, “If the subreport is in the main report's
detail section, then you need to calculate the total from all instances of
the subreport. This is done by adding a text box named
txtRunAmt to the detail section. Set its control source
expression to:
=IIf(QRYsubrptInvoice.REPORT!HasData,QRYsubrptInvoice.REPORT!idamt,0) and
set its RunningSum property to Over All.
Then the grand total in the main report's footer would use
the expression:
=Sum(amt) + txtRunAmt “
Since I’d tried numerous combinations, in the Detail Section with no
results, I decided to try and interpret what you’d written. I put an unbound
txt box with the control source of
“=IIf(SubRpt_AInc.Report!HasData,SubRpt_AInc.Report!idamt,0) and set the
running sum to all over. And try an unbound txt box in the report footer with
“=Sum(amt) + txtRunAmtâ€
After all, what I’d been through, I did not have anything to loose.
Unfortunately for me, it did not work. When I ran the report, it asked for
SubRpt_AInc. And =Sum(Amt) and txtRunAmt.
Marshall, I really hope you can help me as I have the other half of the
financial statement to create. I never dreamed it would be such an ordeal to
achieve an Ending Balance. I shall be humbled again and truly thankful if you
can help me. k
And, not knowing exactly what you want when trying to help someone, I hope
the following will help you more fully understand what I have. Incidentally,
the beginning balance, total income, and total expenses, are all correct and
line up perfectly as a Financial Report sould.
Now, how do I get the ending balance to show and be accurate with the
following information:
I have a main report, rpt_FinancialStatement. I have the Beginning Balance
and two subreports, SubReport_Income and SubReport_Expenses in the Detail
Section of the main report.
I’m beginning with descriptions of my subreports and will try to put them
in, a manner which makes sense
Name: SubRpt_ArvestIncome
Control Source: SumQry_ArvestIncome
SubRpt_ArvestIncome Report Footer:
Name: SubRpt_ArvestIncome.TxtIncomeSum
Control Source: =Sum([ATotInc])
Name: SubRpt_ArvestClientAndNonClientExpenses
Control Source: SumQry_ArvestClientAndNonClientExpenses
SubRpt_ArvestExpenses Report Footer:
Name: SubRpt_ArvestClientAndNonClientExpenses.TxtExpenseSum)
Control Source: =Sum([ATotExp])
Main Report:
Name: Rpt_FinancialStatement
Control Source: Qry_Arvest
Detail Section of Rpt_FinancialStatement:
1st Field is:
Name: rpt_FinancialStatement.Report.TxtBegBalSum
Control Source: ABegBal
1st SubRpt is:
Name: SubRpt_ArvestIncome.Report.TxtIncomeSum
Source Object: Report.SubRpt_ArvestIncome
Link Child Field MonthYear
Link Master Field: MonthYear
2nd SubReport is:
Name: SubRpt_ArvestClientAndNonClientExpenses.Report.TxtExpenseSum
Source Object: Report.SubRpt_ArvestClientAndNonClientExpenses
Link Child Field MonthYear
Link Master Field: MonthYear
Rpt_FinancialStatement Footer
In an unbound txt box, I tried the following two Control Sources:
=[ABegBal]+[SubRpt_AInc.Report.TxtIncomeSum]-
[SubRpt_AExpenses.Report.TxtExpenseSum]
AND
=Sum([ABegBal])+[SubRpt_AInc.Report.TxtIncomeSum]-[SubRpt_AExpenses.Report.TxtExpenseSum]
Plus my interpretation of your post to Margaret.
As I stated above, these Names returned nothing; trying the Control Sources
themselves returned nothing except bracketing errors.
Good luck and Christ’s blessings,
k
Your answer to Margaret on 10/17/04 was so well explained, I hope you can
help me out. I’ve been trying for over three weeks to find the solution to
this problem: the Ending Balance of a report with two subreports.
I have the Beginning Balance and the two subreports in the Detail Section of
the Main Report: rpt_AFinancialStmt. I know that I have to add the beginning
balance, the total income together and subtract the total expenses to obtain
the ending balance.
I put an unbound text box in the Detail Section below the SubRpt_AInc in
which I put [ABegBal]+[ATotInc]. I received a post from Duane stating I
needed to have the name of the report and “txtIncomeSum†or “txtExpenseSumâ€
as the Control Source in an unbound text box. I worked with him but have no
end result and I have not heard from him in several days.
I was reading other posts and found the one mentioned above from Margaret,
Calucating Rpt/SubRpt, 10/17/04 and decided I’d post my question with your
name and hopefully you would see it and be able to help me reach achieve an
Ending Balance.
Not fully understanding your post, “If the subreport is in the main report's
detail section, then you need to calculate the total from all instances of
the subreport. This is done by adding a text box named
txtRunAmt to the detail section. Set its control source
expression to:
=IIf(QRYsubrptInvoice.REPORT!HasData,QRYsubrptInvoice.REPORT!idamt,0) and
set its RunningSum property to Over All.
Then the grand total in the main report's footer would use
the expression:
=Sum(amt) + txtRunAmt “
Since I’d tried numerous combinations, in the Detail Section with no
results, I decided to try and interpret what you’d written. I put an unbound
txt box with the control source of
“=IIf(SubRpt_AInc.Report!HasData,SubRpt_AInc.Report!idamt,0) and set the
running sum to all over. And try an unbound txt box in the report footer with
“=Sum(amt) + txtRunAmtâ€
After all, what I’d been through, I did not have anything to loose.
Unfortunately for me, it did not work. When I ran the report, it asked for
SubRpt_AInc. And =Sum(Amt) and txtRunAmt.
Marshall, I really hope you can help me as I have the other half of the
financial statement to create. I never dreamed it would be such an ordeal to
achieve an Ending Balance. I shall be humbled again and truly thankful if you
can help me. k
And, not knowing exactly what you want when trying to help someone, I hope
the following will help you more fully understand what I have. Incidentally,
the beginning balance, total income, and total expenses, are all correct and
line up perfectly as a Financial Report sould.
Now, how do I get the ending balance to show and be accurate with the
following information:
I have a main report, rpt_FinancialStatement. I have the Beginning Balance
and two subreports, SubReport_Income and SubReport_Expenses in the Detail
Section of the main report.
I’m beginning with descriptions of my subreports and will try to put them
in, a manner which makes sense
Name: SubRpt_ArvestIncome
Control Source: SumQry_ArvestIncome
SubRpt_ArvestIncome Report Footer:
Name: SubRpt_ArvestIncome.TxtIncomeSum
Control Source: =Sum([ATotInc])
Name: SubRpt_ArvestClientAndNonClientExpenses
Control Source: SumQry_ArvestClientAndNonClientExpenses
SubRpt_ArvestExpenses Report Footer:
Name: SubRpt_ArvestClientAndNonClientExpenses.TxtExpenseSum)
Control Source: =Sum([ATotExp])
Main Report:
Name: Rpt_FinancialStatement
Control Source: Qry_Arvest
Detail Section of Rpt_FinancialStatement:
1st Field is:
Name: rpt_FinancialStatement.Report.TxtBegBalSum
Control Source: ABegBal
1st SubRpt is:
Name: SubRpt_ArvestIncome.Report.TxtIncomeSum
Source Object: Report.SubRpt_ArvestIncome
Link Child Field MonthYear
Link Master Field: MonthYear
2nd SubReport is:
Name: SubRpt_ArvestClientAndNonClientExpenses.Report.TxtExpenseSum
Source Object: Report.SubRpt_ArvestClientAndNonClientExpenses
Link Child Field MonthYear
Link Master Field: MonthYear
Rpt_FinancialStatement Footer
In an unbound txt box, I tried the following two Control Sources:
=[ABegBal]+[SubRpt_AInc.Report.TxtIncomeSum]-
[SubRpt_AExpenses.Report.TxtExpenseSum]
AND
=Sum([ABegBal])+[SubRpt_AInc.Report.TxtIncomeSum]-[SubRpt_AExpenses.Report.TxtExpenseSum]
Plus my interpretation of your post to Margaret.
As I stated above, these Names returned nothing; trying the Control Sources
themselves returned nothing except bracketing errors.
Good luck and Christ’s blessings,
k