473,322 Members | 1,671 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,322 software developers and data experts.

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

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
2 1986
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hans | last post by:
Hi, I want to create a report. The query looks like this: SELECT A.Name, Sum(A.Hours) AS FROM A GROUP BY A.Name; Now I want in my report to have a last line with the total hours from all....
13
by: Andrew | last post by:
I use conditional compiler constants, set through the VBA IDE in Tools, <projectname> Properties, that I refer to throughout my code to control which code is used during development, and which...
9
by: Colin McGuire | last post by:
Hi, I have an report in Microsoft Access and it displays everything in the table. One column called "DECISION" in the table has either 1,2, or 3 in it. On my report it displays 1, 2, or 3. I want...
8
by: Mark Flippin | last post by:
This is for a reporting problem using: Access 2000 SQL Server 2000 Both at SP3 I've a stored procedure in SQL Server 2000 which builds a result set from a disparate set of tables, utilizing...
6
by: DS | last post by:
How do you get a sumon a calculated field in a detail section on a report? I have a group footer that I need the sum on. Thanks DS
0
by: imassadpk | last post by:
Hi all, Apprecite your help in resolving this tricky issue... I am trying implementing Recurrsive TreeView in MS. Access 2003 ADP project. So far, no luck :( The Problem: This sample...
10
by: William Krick | last post by:
I am writing an XSL transform that converts XML data about vehicles into XML data that will fill printed forms. The default form can handle up to 5 vehicles which I handle using subscripts... ...
2
by: philip260 | last post by:
Hello everyone. I have created a report that runs off a query. The query will return results that have different records for different people but will only have one (staff time) see query...
1
by: Dave S | last post by:
I am currently in the process of converting an MDB to ADP linked to a SQL Server back end. In the MDB I have expressions in both queries and report controls that are essentially: ...
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
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.