UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Show Total Of Two Subreports On Main Report, Office 2007    
 
   
Kruzer
post Apr 3 2012, 01:29 PM
Post #1

UtterAccess Addict
Posts: 155



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?


--------------------
Cheers,
Go to the top of the page
 
+
arnelgp
post Apr 3 2012, 01:40 PM
Post #2

UtterAccess Ruler
Posts: 1,216
From: somewhere out there...



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))


--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
+
doctor9
post Apr 3 2012, 01:42 PM
Post #3

UtterAccess Editor
Posts: 12,085
From: Wisconsin



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


--------------------
(;,;) Li'l Cthulu says: Make sure you provide enough info in your questions!
Changing your real table name to "Table1" and your real form name to "Form1" makes it more difficult to understand what's going on, not easier.
Guidelines for Posting Questions
Go to the top of the page
 
+
Kruzer
post Apr 3 2012, 01:44 PM
Post #4

UtterAccess Addict
Posts: 155



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?


--------------------
Cheers,
Go to the top of the page
 
+
arnelgp
post Apr 3 2012, 01:49 PM
Post #5

UtterAccess Ruler
Posts: 1,216
From: somewhere out there...



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.


--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
+
Kruzer
post Apr 3 2012, 01:53 PM
Post #6

UtterAccess Addict
Posts: 155



Perfect. Thanks for the explanation and assistance.

Have a great day.


--------------------
Cheers,
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Search  ·  Go to Top  ·  Lo-Fi Version Time is now: 22nd July 2014 - 04:23 PM