Full Version: Show Total Of Two Subreports On Main Report
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
Kruzer
I've tried different combinations that I've found already posted but not having success.

I use the following:

=nz(([Reports]![Copy Of RptInvoice]![rptInvoicePublishing Subreport].[Report]![PublishedTotal]),0)+nz(([Reports]![Copy Of RptInvoice]![rptInvoiceServices Subreport].[Report]![ServicesTotal]),0)

and get:

$1.50$14.50

These are the totals of each of the two subreports. What's missing?
arnelgp
CODE
=nz(([Reports]![Copy Of RptInvoice]![rptInvoicePublishing Subreport].[Report]![PublishedTotal]),0)+nz(([Reports]![Copy Of RptInvoice]![rptInvoiceServices Subreport].[Report]![ServicesTotal]),0)


try:


CODE
= "$" & CCur(nz(([Reports]![Copy Of RptInvoice]![rptInvoicePublishing Subreport].[Report]![PublishedTotal]),0))+CCur(nz(([Reports]![Copy Of RptInvoice]![rptInvoiceServices Subreport].[Report]![ServicesTotal]),0))
doctor9
Kruzer,

Just a wild stab in the dark here, but maybe convert your two subreport values to Currency datatype, since the Nz() function seems to be returning a string value:

=CCcur(nz(([Reports]![Copy Of RptInvoice]![rptInvoicePublishing Subreport].[Report]![PublishedTotal]),0))+CCur(nz(([Reports]![Copy Of RptInvoice]![rptInvoiceServices Subreport].[Report]![ServicesTotal]),0))

Hope this helps,

Dennis
Kruzer
This works. Thank you!

Can you explain the "$" & CCur so I understand what it is?

Edit: Can it also be formated to be $0.00?
arnelgp
CCur() will convert your text to Currency format, while "$" in front just add a dollar sign to your total (just in case you will display it on label control).

If it will be displayed on TextBox, you can remove the "$" sign, provided that you have formatted your Textbox as Currency.
Kruzer
Perfect. Thanks for the explanation and assistance.

Have a great day.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.