A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sum of Amounts in a report



 
 
Thread Tools Display Modes
  #1  
Old September 20th, 2004, 10:42 PM
external usenet poster
 
Posts: n/a
Default Sum of Amounts in a report

I have a report/sub report. I would like to add the sum
of the report and the sub report and display it on the
report. Is this possible? If yes, how?

Thanks
  #2  
Old September 21st, 2004, 02:21 AM
Marshall Barton
external usenet poster
 
Posts: n/a
Default

wrote:

I have a report/sub report. I would like to add the sum
of the report and the sub report and display it on the
report. Is this possible? If yes, how?


Does the subreport appear more than once (e.g. in each
detail)?

If not, then you can use a text box with a simple expression
like:
=Sum(field) + subreport.Report.textbox

field
is the name of the field in the main report's record source
table/query that you want to sum.

subreport
is the name of the subreport control on the main report.

textbox
is the name of the text box in the subreport's footer that
you want to add to the main report's total.
--
Marsh
MVP [MS Access]
  #3  
Old September 21st, 2004, 01:33 PM
external usenet poster
 
Posts: n/a
Default

The sub report appears in each detail.
-----Original Message-----
wrote:

I have a report/sub report. I would like to add the sum
of the report and the sub report and display it on the
report. Is this possible? If yes, how?


Does the subreport appear more than once (e.g. in each
detail)?

If not, then you can use a text box with a simple

expression
like:
=Sum(field) + subreport.Report.textbox

field
is the name of the field in the main report's record

source
table/query that you want to sum.

subreport
is the name of the subreport control on the main report.

textbox
is the name of the text box in the subreport's footer that
you want to add to the main report's total.
--
Marsh
MVP [MS Access]
.

  #4  
Old September 21st, 2004, 03:26 PM
Marshall Barton
external usenet poster
 
Posts: n/a
Default

In that case, add a text box named txtRunSubTot to the
detail section. Set its control source expression to:
=subreport.Report.textbox
and set its RunningSum property to Over All.

Note that is there's any chance that the subreport might not
have any data, the expression should be:
=IIf(subreport.Report.HasData, subreport.Report.textbox, 0)

The grand total text box in the main report's footer would
then be:
=Sum(field) + txtRunSubTot
--
Marsh
MVP [MS Access]



wrote:

The sub report appears in each detail.
-----Original Message-----
wrote:

I have a report/sub report. I would like to add the sum
of the report and the sub report and display it on the
report. Is this possible? If yes, how?


Does the subreport appear more than once (e.g. in each
detail)?

If not, then you can use a text box with a simple

expression
like:
=Sum(field) + subreport.Report.textbox

field
is the name of the field in the main report's record

source
table/query that you want to sum.

subreport
is the name of the subreport control on the main report.

textbox
is the name of the text box in the subreport's footer that
you want to add to the main report's total.



  #5  
Old September 21st, 2004, 04:38 PM
external usenet poster
 
Posts: n/a
Default

Is the testbox a textbox in the sub-report footer?
-----Original Message-----
In that case, add a text box named txtRunSubTot to the
detail section. Set its control source expression to:
=subreport.Report.textbox
and set its RunningSum property to Over All.

Note that is there's any chance that the subreport might

not
have any data, the expression should be:
=IIf(subreport.Report.HasData, subreport.Report.textbox,

0)

The grand total text box in the main report's footer would
then be:
=Sum(field) + txtRunSubTot
--
Marsh
MVP [MS Access]



wrote:

The sub report appears in each detail.
-----Original Message-----
wrote:

I have a report/sub report. I would like to add the

sum
of the report and the sub report and display it on the
report. Is this possible? If yes, how?

Does the subreport appear more than once (e.g. in each
detail)?

If not, then you can use a text box with a simple

expression
like:
=Sum(field) + subreport.Report.textbox

field
is the name of the field in the main report's record

source
table/query that you want to sum.

subreport
is the name of the subreport control on the main report.

textbox
is the name of the text box in the subreport's footer

that
you want to add to the main report's total.



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Page Margins Vel Setting Up & Running Reports 6 September 19th, 2004 09:46 PM
programmatically add controls to report G Setting Up & Running Reports 2 August 4th, 2004 09:11 PM
Restrict Report To Current Record Katherine R Setting Up & Running Reports 1 July 15th, 2004 07:23 PM
6 Tables, 1 Report, W/O 6 Qrys Andy Setting Up & Running Reports 9 June 29th, 2004 09:52 PM
Label SRIT General Discussion 2 June 22nd, 2004 09:42 PM


All times are GMT +1. The time now is 05:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.