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  

Reporting subreport total on main report



 
 
Thread Tools Display Modes
  #1  
Old October 26th, 2005, 10:35 AM
BobV
external usenet poster
 
Posts: n/a
Default Reporting subreport total on main report

I am trying to create a financial report that compares planned spending
against actual spending. Actually, I have the report basically done--using
the main report as the planned and the subreport as the actual. The planned
budget item appears first, followed by a transaction report showing spending
against that particular planned line item, which I have totalling after
each. Now, I just want to show a total at the end of the report which
reflects the total actual spending, and I can't seem to get it
accomplished......I keep getting #Error instead of the figure. If I go into
the subreport, where I've created the total in a text box which I'm trying
to draw into the main report, it runs fine when I run the subreport....I get
the actual spending figure. And I'm pretty sure I've got everything right
(but obviously not) in the text box on the main report:

=[subreportname].[report]![name of text box in subreport]

Can anyone explain what is wrong and how to get a total from a subreport
into a main report. I've looked in the KB and see that if there's no data
you'll get this error, but I do actually have data so a amount should be
showing up.

Any help greatly appreciated.....thanks,
Bob


  #2  
Old October 26th, 2005, 01:06 PM
Tom Lake
external usenet poster
 
Posts: n/a
Default Reporting subreport total on main report

And I'm pretty sure I've got everything right
(but obviously not) in the text box on the main report:

=[subreportname].[report]![name of text box in subreport]

Can anyone explain what is wrong and how to get a total from a subreport
into a main report. I've looked in the KB and see that if there's no data
you'll get this error, but I do actually have data so a amount should be
showing up.


I just use

=[subreportname]![name of textbox in subreport]


Make sure that for subreportname, you use the name of the subreport
control on the main form, which is not necessarily the name of the subreport
itself.

Tom Lake


  #3  
Old October 26th, 2005, 04:09 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default Reporting subreport total on main report

Is subreportname the name of the control or the name of the subreport? Is
the text box that references the subreport in the same section of the report
as the subreport?

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
I am trying to create a financial report that compares planned spending
against actual spending. Actually, I have the report basically
done--using
the main report as the planned and the subreport as the actual. The
planned
budget item appears first, followed by a transaction report showing
spending
against that particular planned line item, which I have totalling after
each. Now, I just want to show a total at the end of the report which
reflects the total actual spending, and I can't seem to get it
accomplished......I keep getting #Error instead of the figure. If I go
into
the subreport, where I've created the total in a text box which I'm trying
to draw into the main report, it runs fine when I run the subreport....I
get
the actual spending figure. And I'm pretty sure I've got everything right
(but obviously not) in the text box on the main report:

=[subreportname].[report]![name of text box in subreport]

Can anyone explain what is wrong and how to get a total from a subreport
into a main report. I've looked in the KB and see that if there's no data
you'll get this error, but I do actually have data so a amount should be
showing up.

Any help greatly appreciated.....thanks,
Bob



  #4  
Old October 26th, 2005, 09:42 PM
BobV
external usenet poster
 
Posts: n/a
Default Reporting subreport total on main report

Subreportname is the name of the subreport.
The control in the subreport is in the report footer; the text box
referencing it in the main report is also in the report footer.

Thanks,
Bob


"Duane Hookom" wrote in message
...
Is subreportname the name of the control or the name of the subreport? Is
the text box that references the subreport in the same section of the
report as the subreport?

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
I am trying to create a financial report that compares planned spending
against actual spending. Actually, I have the report basically
done--using
the main report as the planned and the subreport as the actual. The
planned
budget item appears first, followed by a transaction report showing
spending
against that particular planned line item, which I have totalling after
each. Now, I just want to show a total at the end of the report which
reflects the total actual spending, and I can't seem to get it
accomplished......I keep getting #Error instead of the figure. If I go
into
the subreport, where I've created the total in a text box which I'm
trying
to draw into the main report, it runs fine when I run the subreport....I
get
the actual spending figure. And I'm pretty sure I've got everything
right
(but obviously not) in the text box on the main report:

=[subreportname].[report]![name of text box in subreport]

Can anyone explain what is wrong and how to get a total from a subreport
into a main report. I've looked in the KB and see that if there's no
data
you'll get this error, but I do actually have data so a amount should be
showing up.

Any help greatly appreciated.....thanks,
Bob





  #5  
Old October 27th, 2005, 05:13 AM
Duane Hookom
external usenet poster
 
Posts: n/a
Default Reporting subreport total on main report

What is the name of the subreport control? This might not be the same as the
subreport name.

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Subreportname is the name of the subreport.
The control in the subreport is in the report footer; the text box
referencing it in the main report is also in the report footer.

Thanks,
Bob


"Duane Hookom" wrote in message
...
Is subreportname the name of the control or the name of the subreport? Is
the text box that references the subreport in the same section of the
report as the subreport?

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
I am trying to create a financial report that compares planned spending
against actual spending. Actually, I have the report basically
done--using
the main report as the planned and the subreport as the actual. The
planned
budget item appears first, followed by a transaction report showing
spending
against that particular planned line item, which I have totalling after
each. Now, I just want to show a total at the end of the report which
reflects the total actual spending, and I can't seem to get it
accomplished......I keep getting #Error instead of the figure. If I go
into
the subreport, where I've created the total in a text box which I'm
trying
to draw into the main report, it runs fine when I run the subreport....I
get
the actual spending figure. And I'm pretty sure I've got everything
right
(but obviously not) in the text box on the main report:

=[subreportname].[report]![name of text box in subreport]

Can anyone explain what is wrong and how to get a total from a subreport
into a main report. I've looked in the KB and see that if there's no
data
you'll get this error, but I do actually have data so a amount should be
showing up.

Any help greatly appreciated.....thanks,
Bob







  #6  
Old October 27th, 2005, 10:33 AM
BobV
external usenet poster
 
Posts: n/a
Default Reporting subreport total on main report

Here's all the actual names:

Main Report: rptSpendplan-to-SpendingComparison
SubReport: qrySpending subreport
Control Name in report footer of subreport: SpendingTotal ; which is:
=Sum([Total])
TextBox in report footer of main report: TotalSpent ; which is:
=[qrySpending subreport].Report!SpendingTotal

Thanks,
Bob


"Duane Hookom" wrote in message
...
What is the name of the subreport control? This might not be the same as
the subreport name.

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Subreportname is the name of the subreport.
The control in the subreport is in the report footer; the text box
referencing it in the main report is also in the report footer.

Thanks,
Bob


"Duane Hookom" wrote in message
...
Is subreportname the name of the control or the name of the subreport?
Is the text box that references the subreport in the same section of the
report as the subreport?

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
I am trying to create a financial report that compares planned spending
against actual spending. Actually, I have the report basically
done--using
the main report as the planned and the subreport as the actual. The
planned
budget item appears first, followed by a transaction report showing
spending
against that particular planned line item, which I have totalling after
each. Now, I just want to show a total at the end of the report which
reflects the total actual spending, and I can't seem to get it
accomplished......I keep getting #Error instead of the figure. If I go
into
the subreport, where I've created the total in a text box which I'm
trying
to draw into the main report, it runs fine when I run the
subreport....I get
the actual spending figure. And I'm pretty sure I've got everything
right
(but obviously not) in the text box on the main report:

=[subreportname].[report]![name of text box in subreport]

Can anyone explain what is wrong and how to get a total from a
subreport
into a main report. I've looked in the KB and see that if there's no
data
you'll get this error, but I do actually have data so a amount should
be
showing up.

Any help greatly appreciated.....thanks,
Bob









  #7  
Old October 27th, 2005, 02:17 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default Reporting subreport total on main report

Several times you have provided the name of your subreport and never
suggested that you knew there is a difference between a subreport control
name and a subreport name.

If your subreport control has the same name as your subreport and the
subreport control and [TotalSpent] text box are in the same section of the
main report and there are records in the subreport, then you should not be
getting an error.

You may need to compile and repair & compact. If that doesn't work, try
replacing the existing subreport with a subreport and a single text box that
you can try pull a value from. Otherwise you can start from scratch on the
main or subreport.

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Here's all the actual names:

Main Report: rptSpendplan-to-SpendingComparison
SubReport: qrySpending subreport
Control Name in report footer of subreport: SpendingTotal ; which is:
=Sum([Total])
TextBox in report footer of main report: TotalSpent ; which is:
=[qrySpending subreport].Report!SpendingTotal

Thanks,
Bob


"Duane Hookom" wrote in message
...
What is the name of the subreport control? This might not be the same as
the subreport name.

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Subreportname is the name of the subreport.
The control in the subreport is in the report footer; the text box
referencing it in the main report is also in the report footer.

Thanks,
Bob


"Duane Hookom" wrote in message
...
Is subreportname the name of the control or the name of the subreport?
Is the text box that references the subreport in the same section of
the report as the subreport?

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
I am trying to create a financial report that compares planned spending
against actual spending. Actually, I have the report basically
done--using
the main report as the planned and the subreport as the actual. The
planned
budget item appears first, followed by a transaction report showing
spending
against that particular planned line item, which I have totalling
after
each. Now, I just want to show a total at the end of the report which
reflects the total actual spending, and I can't seem to get it
accomplished......I keep getting #Error instead of the figure. If I
go into
the subreport, where I've created the total in a text box which I'm
trying
to draw into the main report, it runs fine when I run the
subreport....I get
the actual spending figure. And I'm pretty sure I've got everything
right
(but obviously not) in the text box on the main report:

=[subreportname].[report]![name of text box in subreport]

Can anyone explain what is wrong and how to get a total from a
subreport
into a main report. I've looked in the KB and see that if there's no
data
you'll get this error, but I do actually have data so a amount should
be
showing up.

Any help greatly appreciated.....thanks,
Bob











  #8  
Old October 27th, 2005, 10:18 PM
BobV
external usenet poster
 
Posts: n/a
Default Reporting subreport total on main report

Well, ok then, from your response maybe I don't know what the control is
after all. I guess this'll probably sound pretty dumb, then, but I thought
it was the name of the text box I had created in the report footer of the
subreport.....i.e. the text box named "TotalSpent", the result of which I'm
trying to bring across to the main report. Sorry about that. So, then,
what would the control be in this scenario?

Thanks again,
Bob


"Duane Hookom" wrote in message
...
Several times you have provided the name of your subreport and never
suggested that you knew there is a difference between a subreport control
name and a subreport name.

If your subreport control has the same name as your subreport and the
subreport control and [TotalSpent] text box are in the same section of the
main report and there are records in the subreport, then you should not be
getting an error.

You may need to compile and repair & compact. If that doesn't work, try
replacing the existing subreport with a subreport and a single text box
that you can try pull a value from. Otherwise you can start from scratch
on the main or subreport.

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Here's all the actual names:

Main Report: rptSpendplan-to-SpendingComparison
SubReport: qrySpending subreport
Control Name in report footer of subreport: SpendingTotal ; which is:
=Sum([Total])
TextBox in report footer of main report: TotalSpent ; which is:
=[qrySpending subreport].Report!SpendingTotal

Thanks,
Bob


"Duane Hookom" wrote in message
...
What is the name of the subreport control? This might not be the same as
the subreport name.

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Subreportname is the name of the subreport.
The control in the subreport is in the report footer; the text box
referencing it in the main report is also in the report footer.

Thanks,
Bob


"Duane Hookom" wrote in message
...
Is subreportname the name of the control or the name of the subreport?
Is the text box that references the subreport in the same section of
the report as the subreport?

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
I am trying to create a financial report that compares planned
spending
against actual spending. Actually, I have the report basically
done--using
the main report as the planned and the subreport as the actual. The
planned
budget item appears first, followed by a transaction report showing
spending
against that particular planned line item, which I have totalling
after
each. Now, I just want to show a total at the end of the report
which
reflects the total actual spending, and I can't seem to get it
accomplished......I keep getting #Error instead of the figure. If I
go into
the subreport, where I've created the total in a text box which I'm
trying
to draw into the main report, it runs fine when I run the
subreport....I get
the actual spending figure. And I'm pretty sure I've got everything
right
(but obviously not) in the text box on the main report:

=[subreportname].[report]![name of text box in subreport]

Can anyone explain what is wrong and how to get a total from a
subreport
into a main report. I've looked in the KB and see that if there's no
data
you'll get this error, but I do actually have data so a amount should
be
showing up.

Any help greatly appreciated.....thanks,
Bob













  #9  
Old October 28th, 2005, 04:10 AM
Duane Hookom
external usenet poster
 
Posts: n/a
Default Reporting subreport total on main report

When you add a subreport to a main report, the subreport CONTROL has a name.
This name may or may not be the name of the subreport. Just like if you add
a label or text box to a report, the control has a name. Your subreport
control name may be the same as its Source Object property.

If you look at the Catalog report in Northwind.mdb, it has a subreport
control named "CatalogSubreport" and the Source Object is the "Catalog
Subreport".

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Well, ok then, from your response maybe I don't know what the control is
after all. I guess this'll probably sound pretty dumb, then, but I
thought it was the name of the text box I had created in the report footer
of the subreport.....i.e. the text box named "TotalSpent", the result of
which I'm trying to bring across to the main report. Sorry about that.
So, then, what would the control be in this scenario?

Thanks again,
Bob


"Duane Hookom" wrote in message
...
Several times you have provided the name of your subreport and never
suggested that you knew there is a difference between a subreport control
name and a subreport name.

If your subreport control has the same name as your subreport and the
subreport control and [TotalSpent] text box are in the same section of
the main report and there are records in the subreport, then you should
not be getting an error.

You may need to compile and repair & compact. If that doesn't work, try
replacing the existing subreport with a subreport and a single text box
that you can try pull a value from. Otherwise you can start from scratch
on the main or subreport.

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Here's all the actual names:

Main Report: rptSpendplan-to-SpendingComparison
SubReport: qrySpending subreport
Control Name in report footer of subreport: SpendingTotal ; which is:
=Sum([Total])
TextBox in report footer of main report: TotalSpent ; which is:
=[qrySpending subreport].Report!SpendingTotal

Thanks,
Bob


"Duane Hookom" wrote in message
...
What is the name of the subreport control? This might not be the same
as the subreport name.

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Subreportname is the name of the subreport.
The control in the subreport is in the report footer; the text box
referencing it in the main report is also in the report footer.

Thanks,
Bob


"Duane Hookom" wrote in message
...
Is subreportname the name of the control or the name of the
subreport? Is the text box that references the subreport in the same
section of the report as the subreport?

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
I am trying to create a financial report that compares planned
spending
against actual spending. Actually, I have the report basically
done--using
the main report as the planned and the subreport as the actual. The
planned
budget item appears first, followed by a transaction report showing
spending
against that particular planned line item, which I have totalling
after
each. Now, I just want to show a total at the end of the report
which
reflects the total actual spending, and I can't seem to get it
accomplished......I keep getting #Error instead of the figure. If I
go into
the subreport, where I've created the total in a text box which I'm
trying
to draw into the main report, it runs fine when I run the
subreport....I get
the actual spending figure. And I'm pretty sure I've got everything
right
(but obviously not) in the text box on the main report:

=[subreportname].[report]![name of text box in subreport]

Can anyone explain what is wrong and how to get a total from a
subreport
into a main report. I've looked in the KB and see that if there's
no data
you'll get this error, but I do actually have data so a amount
should be
showing up.

Any help greatly appreciated.....thanks,
Bob















  #10  
Old October 28th, 2005, 11:37 AM
BobV
external usenet poster
 
Posts: n/a
Default Reporting subreport total on main report

Ok, thanks, same thing here then......the name of the subreport and the name
of the control on the main report for that subreport have the same name. I
guess I'm back to square one then.....sounds like what you're saying is that
this really "should" be working but for some reason is not......compiling
and repairing did not produce anything positive, so I guess I'll recreate
them from scratch and see if that helps.

The only thing I see in what you've said in your last response is that the
subreport control and the "TotalSpent" text box are not in the same section
of the main report. The control is in the Detail section (because I want
the spending figures to immediately follow the planned spending line item
against which those dollars are being spent), and the TotalSpent textbox is
in the Report Footer (because I want a Grand Total of all spending, or the
total of all the individual totals throughout the subreport, at the end of
the report. I've actually tried putting them together, though, and although
it doesn't give me the visual presentation I'm looking for, I still get the
#Error.

Thanks for all your help on this,
Bob


"Duane Hookom" wrote in message
...
When you add a subreport to a main report, the subreport CONTROL has a
name. This name may or may not be the name of the subreport. Just like if
you add a label or text box to a report, the control has a name. Your
subreport control name may be the same as its Source Object property.

If you look at the Catalog report in Northwind.mdb, it has a subreport
control named "CatalogSubreport" and the Source Object is the "Catalog
Subreport".

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Well, ok then, from your response maybe I don't know what the control is
after all. I guess this'll probably sound pretty dumb, then, but I
thought it was the name of the text box I had created in the report
footer of the subreport.....i.e. the text box named "TotalSpent", the
result of which I'm trying to bring across to the main report. Sorry
about that. So, then, what would the control be in this scenario?

Thanks again,
Bob


"Duane Hookom" wrote in message
...
Several times you have provided the name of your subreport and never
suggested that you knew there is a difference between a subreport
control name and a subreport name.

If your subreport control has the same name as your subreport and the
subreport control and [TotalSpent] text box are in the same section of
the main report and there are records in the subreport, then you should
not be getting an error.

You may need to compile and repair & compact. If that doesn't work, try
replacing the existing subreport with a subreport and a single text box
that you can try pull a value from. Otherwise you can start from scratch
on the main or subreport.

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Here's all the actual names:

Main Report: rptSpendplan-to-SpendingComparison
SubReport: qrySpending subreport
Control Name in report footer of subreport: SpendingTotal ; which is:
=Sum([Total])
TextBox in report footer of main report: TotalSpent ; which is:
=[qrySpending subreport].Report!SpendingTotal

Thanks,
Bob


"Duane Hookom" wrote in message
...
What is the name of the subreport control? This might not be the same
as the subreport name.

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
Subreportname is the name of the subreport.
The control in the subreport is in the report footer; the text box
referencing it in the main report is also in the report footer.

Thanks,
Bob


"Duane Hookom" wrote in message
...
Is subreportname the name of the control or the name of the
subreport? Is the text box that references the subreport in the same
section of the report as the subreport?

--
Duane Hookom
MS Access MVP


"BobV" wrote in message
...
I am trying to create a financial report that compares planned
spending
against actual spending. Actually, I have the report basically
done--using
the main report as the planned and the subreport as the actual.
The planned
budget item appears first, followed by a transaction report showing
spending
against that particular planned line item, which I have totalling
after
each. Now, I just want to show a total at the end of the report
which
reflects the total actual spending, and I can't seem to get it
accomplished......I keep getting #Error instead of the figure. If
I go into
the subreport, where I've created the total in a text box which I'm
trying
to draw into the main report, it runs fine when I run the
subreport....I get
the actual spending figure. And I'm pretty sure I've got
everything right
(but obviously not) in the text box on the main report:

=[subreportname].[report]![name of text box in subreport]

Can anyone explain what is wrong and how to get a total from a
subreport
into a main report. I've looked in the KB and see that if there's
no data
you'll get this error, but I do actually have data so a amount
should be
showing up.

Any help greatly appreciated.....thanks,
Bob

















 




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
Grand Total on Main Report from 7 subreports Pat H New Users 1 August 22nd, 2005 03:51 PM
subreport generated by user input in main report does not work michaelreb Setting Up & Running Reports 1 August 16th, 2005 03:52 PM
Show Total In Subreport On Main Report Marie Setting Up & Running Reports 1 February 2nd, 2005 02:03 AM
Sum 2 subreports total in a main report Ashley Setting Up & Running Reports 3 January 17th, 2005 06:53 PM
Repost-Still Suffering with Subreports IreneJ Setting Up & Running Reports 9 August 31st, 2004 04:55 AM


All times are GMT +1. The time now is 10:54 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.