Problem with subreport total

  • Thread starter Thread starter John
  • Start date Start date
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
 
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.
 
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
 
-----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
 
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.
 
-----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
 
Back
Top