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

Welcome to UtterAccess! Please ( Login   or   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



Posts: 247
Joined: 26-February 11
From: Nova Scotia, Canada


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?
Go to the top of the page
 
arnelgp
post Apr 3 2012, 01:40 PM
Post#2



Posts: 1,216
Joined: 2-April 09
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)

ry:
CODE
= "$" & CCur(nz(([Reports]![Copy Of RptInvoice]![rptInvoicePublishing Subreport].[Report]![PublishedTotal]),0))+CCur(nz(([Reports]![Copy Of RptInvoice]![rptInvoiceServices Subreport].[Report]![ServicesTotal]),0))
Go to the top of the page
 
doctor9
post Apr 3 2012, 01:42 PM
Post#3


UtterAccess Editor
Posts: 13,784
Joined: 29-March 05
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
Go to the top of the page
 
Kruzer
post Apr 3 2012, 01:44 PM
Post#4



Posts: 247
Joined: 26-February 11
From: Nova Scotia, Canada


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?
Go to the top of the page
 
arnelgp
post Apr 3 2012, 01:49 PM
Post#5



Posts: 1,216
Joined: 2-April 09
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.
Go to the top of the page
 
Kruzer
post Apr 3 2012, 01:53 PM
Post#6



Posts: 247
Joined: 26-February 11
From: Nova Scotia, Canada


Perfect. Thanks for the explanation and assistance.
Have a great day.
Go to the top of the page
 


RSSSearch   Top   Lo-Fi    26th May 2015 - 02:30 AM