By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,488 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,488 IT Pros & Developers. It's quick & easy.

Using =Sum([x]*[y]) in a Report control (ADP)

P: n/a
Hi,

In an MDB report I was able to obtain an Orders total in a Group Footer
by setting a control's ControlSource to: =Sum([Qty]*[Price])

In the Detail section of the report are controls bound to:
(1) Description
(2) Qty
(3) Price, and
(4) =[Qty]*[Price]
These give no problem when the report is imported into an ADP.

However.. the ADP does not like the ControlSource of the OrderTotal
control in the group footer. It produces an error message that says:
"The expression 'Sum([Qty]*[Price])' is invalid."

Is this time-honoured technique no longer allowable? If so, how do I get
the group total of calculated fields on reports in the ADP environment?

Thanks,
Ian.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Ian Hinson" <pp******@bigpond.net.au> wrote in news:f1Hcf.14028$Hj2.260
@news-server.bigpond.net.au:
Hi,

In an MDB report I was able to obtain an Orders total in a Group Footer
by setting a control's ControlSource to: =Sum([Qty]*[Price])

In the Detail section of the report are controls bound to:
(1) Description
(2) Qty
(3) Price, and
(4) =[Qty]*[Price]
These give no problem when the report is imported into an ADP.

However.. the ADP does not like the ControlSource of the OrderTotal
control in the group footer. It produces an error message that says:
"The expression 'Sum([Qty]*[Price])' is invalid."

Is this time-honoured technique no longer allowable? If so, how do I get
the group total of calculated fields on reports in the ADP environment?

Thanks,
Ian.


There may be simpler ways; one way is to set the RecordSource of the Report
to a Stored Procedure or View or SQL String with the fields

(1) Description
(2) Qty
(3) Price, and
(4) [Qty]*[Price] AS Extension(or whatever)

and use

= Sum([Extension]) in the footer.
--
Lyle Fairfield
Nov 13 '05 #2

P: n/a
I added a calculated field "ExtendedPrice" ([Qty]*[Price]) to the underlying
query,
which is now saved as a View in the SQL database.
Thanks. Problem solved.

Ian.

"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:Xn*********************************@216.221.8 1.119...
"Ian Hinson" <pp******@bigpond.net.au> wrote in news:f1Hcf.14028$Hj2.260
@news-server.bigpond.net.au:
Hi,

In an MDB report I was able to obtain an Orders total in a Group Footer
by setting a control's ControlSource to: =Sum([Qty]*[Price])

In the Detail section of the report are controls bound to:
(1) Description
(2) Qty
(3) Price, and
(4) =[Qty]*[Price]
These give no problem when the report is imported into an ADP.

However.. the ADP does not like the ControlSource of the OrderTotal
control in the group footer. It produces an error message that says:
"The expression 'Sum([Qty]*[Price])' is invalid."

Is this time-honoured technique no longer allowable? If so, how do I get
the group total of calculated fields on reports in the ADP environment?

Thanks,
Ian.


There may be simpler ways; one way is to set the RecordSource of the
Report
to a Stored Procedure or View or SQL String with the fields

(1) Description
(2) Qty
(3) Price, and
(4) [Qty]*[Price] AS Extension(or whatever)

and use

= Sum([Extension]) in the footer.
--
Lyle Fairfield

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.