473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Referring to a specific column in a subreport control from a textbox on the main report...

MLH
I have a report and on it, a subreport control

Main Report Name: rptInvoiceMain
Sub Report Name: rptInvoiceSubReport
SubReport Control Name: rptInvoiceSubReportCtl

The subreport contains 2 fields - a text field where line items
sold are listed and a currency field where the price per item
is shown. The subreport control displays these two fields
when the main report is opened.

I have a textbox on the main report where I wish to display
the total dollar amount of subreport column #2. Here is my
controlsource property setting for that textbox:

=Sum([Reports]![Orders]![rptInvoiceSubReportCtl].[Report].[ProcFee])

I'm getting an error. What have I done wrong here?
Jun 15 '06 #1
4 3244
MLH wrote:
I have a report and on it, a subreport control

Main Report Name: rptInvoiceMain
Sub Report Name: rptInvoiceSubReport
SubReport Control Name: rptInvoiceSubReportCtl

The subreport contains 2 fields - a text field where line items
sold are listed and a currency field where the price per item
is shown. The subreport control displays these two fields
when the main report is opened.

I have a textbox on the main report where I wish to display
the total dollar amount of subreport column #2. Here is my
controlsource property setting for that textbox:

=Sum([Reports]![Orders]![rptInvoiceSubReportCtl].[Report].[ProcFee])

I'm getting an error. What have I done wrong here?


Hi MLH,

Normally I would do my summing on the Sub report under a group header
such as the report footer (one the sub report). I would then let the
sub report grow as needed in the main report. The control that sums
column 2 would appear at the bottom of the sub report which would then
appear on the main report from the sub report.

You could also sum the column in a new control on the sub report under
the report footer, hide it there and reference the hidden control in
another control on the main report.

If you try to sum the column the way you are doing it you will get
#Error. You must sum the column in the sub report first. then you can
try any one of the sugestions above I gave you.

Have a great day

Cilla

Jun 15 '06 #2
MLH
Yes, Cilla, it worked much better
performing the summation on the
subreport first. Thank-you.
Jun 15 '06 #3
MLH
Can you also tell me how to 'fix' the field widths
on the subreport. My subreport default view is
datasheet view. I wish to make the first of the
two columns about an inch wider.

I've tried opening the subreport in design view
and modifying the textbox control width. No luck.
I've also tried opening it in datasheet view, resizing
the fields and saving in their resized state. Didn't
do the trick either. Hmmm???
Jun 15 '06 #4

MLH wrote:
Can you also tell me how to 'fix' the field widths
on the subreport. My subreport default view is
datasheet view. I wish to make the first of the
two columns about an inch wider.

I've tried opening the subreport in design view
and modifying the textbox control width. No luck.
I've also tried opening it in datasheet view, resizing
the fields and saving in their resized state. Didn't
do the trick either. Hmmm???


Are you talking forms or reports. Forms have default views for sub
forms not reports?

Yes there is a way to set the width of fields in a subform that is
displayed in datasheet view. Open the sub form in datasheet view and
size your field to the size you wish then click the save button. when
you open the main form the new size of the field in the sub form should
be set.

I also have noticed if you size the field of a subform within the main
form and click the save button a couple of times it will also save the
size you set. (sometimes)

Jun 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Josh Nikle | last post by:
I have a subreport that displays the addresses of suppliers. Its source table has fields for the name, street, city/state, and ZIP code for easier querying. However, for display purposes, I put...
9
by: Downstreamer | last post by:
Design is as follows: A form for the user to input criteria to be used as the where part of the report's recordsource. This includes a multiselect list box as part of the criteria selection. ...
1
by: Kirsty Ryder | last post by:
Hi, I have a Report with a subreport, and I want to assign a value to the control source of a control on the subreport depending on the value given by the user in a separate form. Based on...
1
by: Marie | last post by:
How do you display a total from a subreport on the main report. If it makes a difference, the total is a total of a calculated field (Qty * Price). Does the total on the subreport go in the...
1
by: Frank | last post by:
I am trying to manipulate a textbox display value of subreport from main report's detail print() event. The goal is this, if there is no record from database, replace the blank space from textbox...
1
by: shaqattack1992-newsgroups | last post by:
I know this is kind of a weird question, but is there anyway to give a subreport control of a main report? I posted my situation earlier about having drawings print out after a group. I have a...
2
by: Jimmy | last post by:
On the subreport, records are grouped by WorkDate. In the WorkDate header there is a textbox named DateCounter with the control source =1 and running sum set to yes. In either the report footer or...
6
by: xian2 | last post by:
Hi All, I know you have heard this all before from the millions of other people asking the same question, but I have read through many other posts and NeoPa's guide and another guide i found on...
12
D Giles
by: D Giles | last post by:
Access 2003: A subreport control (sum total calculated textbox located in the subreport report footer) does not show total of all records when referenced as a total in the main report footer - only...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.