Reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I sum a subreport with two other totals that are in the order ID
footer at the end of a report?
 
Assuming you have a main report and a suberport, you would do something like
this:

Me.MyTotal = Me.MySubreportControl.Report!SubReportTotalTextBox +
Me.MyMainReportTotalTextBox

Where Me is the main report.
Keep in mind that if the subreport has no records, you'll get #Error in the
calculation. To avoid this, I use the IsError function.

Ray
 
My Main Report right now is called Report, the subreport (which is in the
Detail section of the report) name is "Orders Detail Query subform". In the
subreport I have several products. Also I have in the Detail section is two
Text Boxes one is Labor Total and the other is Equipment Total. In the Order
ID Footer I have a text box that in the control source is this: "=sum([Labor
Total]+[Equipment Total])+[Orders Detail Query subform].[Report].[Chemical
Total]" which gives me my Invoice Totals right.
But when I need a Grand Total in the report footer the control source will
only pull from one Invoice.

mweber
 
What is the Grand Total supposed to add up?

MWeber said:
My Main Report right now is called Report, the subreport (which is in the
Detail section of the report) name is "Orders Detail Query subform". In the
subreport I have several products. Also I have in the Detail section is two
Text Boxes one is Labor Total and the other is Equipment Total. In the Order
ID Footer I have a text box that in the control source is this: "=sum([Labor
Total]+[Equipment Total])+[Orders Detail Query subform].[Report].[Chemical
Total]" which gives me my Invoice Totals right.
But when I need a Grand Total in the report footer the control source will
only pull from one Invoice.

mweber

Ray said:
Assuming you have a main report and a suberport, you would do something like
this:

Me.MyTotal = Me.MySubreportControl.Report!SubReportTotalTextBox +
Me.MyMainReportTotalTextBox

Where Me is the main report.
Keep in mind that if the subreport has no records, you'll get #Error in the
calculation. To avoid this, I use the IsError function.

Ray
 
The Grand Total is suppose to add the Subreport, the labor and Equipment
total so it will show the statement total (grand total). But it will only
show the total for one Invoice instead of two or more invoices.


Ray said:
What is the Grand Total supposed to add up?

MWeber said:
My Main Report right now is called Report, the subreport (which is in the
Detail section of the report) name is "Orders Detail Query subform". In the
subreport I have several products. Also I have in the Detail section is two
Text Boxes one is Labor Total and the other is Equipment Total. In the Order
ID Footer I have a text box that in the control source is this: "=sum([Labor
Total]+[Equipment Total])+[Orders Detail Query subform].[Report].[Chemical
Total]" which gives me my Invoice Totals right.
But when I need a Grand Total in the report footer the control source will
only pull from one Invoice.

mweber

Ray said:
Assuming you have a main report and a suberport, you would do something like
this:

Me.MyTotal = Me.MySubreportControl.Report!SubReportTotalTextBox +
Me.MyMainReportTotalTextBox

Where Me is the main report.
Keep in mind that if the subreport has no records, you'll get #Error in the
calculation. To avoid this, I use the IsError function.

Ray


:

How do I sum a subreport with two other totals that are in the order ID
footer at the end of a report?
 
Try adding a third hidden textbox (invoice total) in your order ID section
that sums up each invoice, then in your report footer, take the sum of that
textbox. What's the syntax you currently have for your Grand Total?

MWeber said:
The Grand Total is suppose to add the Subreport, the labor and Equipment
total so it will show the statement total (grand total). But it will only
show the total for one Invoice instead of two or more invoices.


Ray said:
What is the Grand Total supposed to add up?

MWeber said:
My Main Report right now is called Report, the subreport (which is in the
Detail section of the report) name is "Orders Detail Query subform". In the
subreport I have several products. Also I have in the Detail section is two
Text Boxes one is Labor Total and the other is Equipment Total. In the Order
ID Footer I have a text box that in the control source is this: "=sum([Labor
Total]+[Equipment Total])+[Orders Detail Query subform].[Report].[Chemical
Total]" which gives me my Invoice Totals right.
But when I need a Grand Total in the report footer the control source will
only pull from one Invoice.

mweber

:

Assuming you have a main report and a suberport, you would do something like
this:

Me.MyTotal = Me.MySubreportControl.Report!SubReportTotalTextBox +
Me.MyMainReportTotalTextBox

Where Me is the main report.
Keep in mind that if the subreport has no records, you'll get #Error in the
calculation. To avoid this, I use the IsError function.

Ray


:

How do I sum a subreport with two other totals that are in the order ID
footer at the end of a report?
 
Thanks Ray it worked.

mweber

Ray said:
Try adding a third hidden textbox (invoice total) in your order ID section
that sums up each invoice, then in your report footer, take the sum of that
textbox. What's the syntax you currently have for your Grand Total?

MWeber said:
The Grand Total is suppose to add the Subreport, the labor and Equipment
total so it will show the statement total (grand total). But it will only
show the total for one Invoice instead of two or more invoices.


Ray said:
What is the Grand Total supposed to add up?

:

My Main Report right now is called Report, the subreport (which is in the
Detail section of the report) name is "Orders Detail Query subform". In the
subreport I have several products. Also I have in the Detail section is two
Text Boxes one is Labor Total and the other is Equipment Total. In the Order
ID Footer I have a text box that in the control source is this: "=sum([Labor
Total]+[Equipment Total])+[Orders Detail Query subform].[Report].[Chemical
Total]" which gives me my Invoice Totals right.
But when I need a Grand Total in the report footer the control source will
only pull from one Invoice.

mweber

:

Assuming you have a main report and a suberport, you would do something like
this:

Me.MyTotal = Me.MySubreportControl.Report!SubReportTotalTextBox +
Me.MyMainReportTotalTextBox

Where Me is the main report.
Keep in mind that if the subreport has no records, you'll get #Error in the
calculation. To avoid this, I use the IsError function.

Ray


:

How do I sum a subreport with two other totals that are in the order ID
footer at the end of a report?
 
Back
Top