Problem with subreport total

J

John

I have a main report "rptInvoice" and a subreport "rptInvoiceSubreport".
The subreport has three fields taken from a query. UnitPrice Quantity and
ExtendedPrice. I want to total the ExtendedPrice fields from the subreport
in the report footer of the main report.

I have tried =Sum([rptInvoiceSubreport]![ExtendedPrice])

and =Sum([rptInvoiceSubreport]![UnitPrice]*[rptInvoiceSubreport]![Quantity])

Each time I get a dialog requesting a parameter value. Can anyone tell me
where I'm going wrong.

Any help greatly appreciated.

John
 
S

StCyrM

Hi John

Referencing forms, subforms, reports and subreports sometimes takes a bit of
getting used to.

In your case, since you have a Main Report and a Sub Report , the referencing
statements will have to be modified to meet the following statement:

To refer to a control on a subreport, use the following syntax:

Reports![mainreportname]![subreport controlname].Report![control
name]

will reference the appropriate control

Hope this helps

Best regards

Maurice St-Cyr
Micro Systems Consultants, Inc.
 
J

John

Thanks for that.
The Subtotal textbox now reads.

=Sum([Reports]![rptInvoice]![SubreportControl].Report!UnitPrice*[Reports]![r
ptInvoice]![SubreportControl].Report!Quantity)

This gets rid of the enter parameter dialog, but whatever this sum returns
doesn't display. The label is there but not the textbox. The visible
property is set to yes.

Any ideas

John


StCyrM said:
Hi John

Referencing forms, subforms, reports and subreports sometimes takes a bit of
getting used to.

In your case, since you have a Main Report and a Sub Report , the referencing
statements will have to be modified to meet the following statement:

To refer to a control on a subreport, use the following syntax:

Reports![mainreportname]![subreport controlname].Report![control
name]

will reference the appropriate control

Hope this helps

Best regards

Maurice St-Cyr
Micro Systems Consultants, Inc.

I have a main report "rptInvoice" and a subreport "rptInvoiceSubreport".
The subreport has three fields taken from a query. UnitPrice Quantity and
ExtendedPrice. I want to total the ExtendedPrice fields from the subreport
in the report footer of the main report.

I have tried =Sum([rptInvoiceSubreport]![ExtendedPrice])

and =Sum([rptInvoiceSubreport]![UnitPrice]*[rptInvoiceSubreport]![Quantity])

Each time I get a dialog requesting a parameter value. Can anyone tell me
where I'm going wrong.

Any help greatly appreciated.

John
 
G

Guest

-----Original Message-----
I have a main report "rptInvoice" and a
subreport "rptInvoiceSubreport".
The subreport has three fields taken from a query. UnitPrice Quantity and
ExtendedPrice. I want to total the ExtendedPrice fields from the subreport
in the report footer of the main report.

I have tried =Sum([rptInvoiceSubreport]![ExtendedPrice])

and =Sum([rptInvoiceSubreport]![UnitPrice]* [rptInvoiceSubreport]![Quantity])

Each time I get a dialog requesting a parameter value. Can anyone tell me
where I'm going wrong.

Any help greatly appreciated.

John


. its al ova mate jus leave it
 
S

StCyrM

Good morning

If you are trying to reference the subreport from the main report, you then
have to change the way you reference the reports.

The general expression would be as follows:

Reports!rptInvoice!rptInvoiceSubreport.Report!ExtendedPrice


Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.
 
A

Asim Mahmood from Pakistan

-----Original Message-----
I have a main report "rptInvoice" and a
subreport "rptInvoiceSubreport".
The subreport has three fields taken from a query. UnitPrice Quantity and
ExtendedPrice. I want to total the ExtendedPrice fields from the subreport
in the report footer of the main report.

I have tried =Sum([rptInvoiceSubreport]![ExtendedPrice])

and =Sum([rptInvoiceSubreport]![UnitPrice]* [rptInvoiceSubreport]![Quantity])

Each time I get a dialog requesting a parameter value. Can anyone tell me
where I'm going wrong.

Any help greatly appreciated.
Hello John, (Write me from where r u)
Here is ur answer

=Sum([rptInvoice]![rptInvoiceSubreport]![ExtendedPrice])

=Sum([rptInvoice]![rptInvoiceSubreport]![UnitPrice]*
[rptInvoiceSubreport]![Quantity])

Good Bye
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top