Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 24th, 2004, 02:22 PM
Authorized User
 
Join Date: Apr 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default Report Sum()


In my Access Projects Report, I cannot use any aggregate functions, sum, avg in the control source of textboxes unless the control source
is a field from the stored procedure linked to the form, I was able to use these functions on any textbox in regular Access, but now
I get Error messages like "Column ???? does not exist in appropriate rowset" or "Aggregate Functions are only allowed on on output fields of the recordsource"

ie: =Sum( [txt_Detail_Total] )
Should, but doesn't work


Access 2003 ADP Project

 
Old November 24th, 2004, 07:32 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

What you can do is create a view with calculation and base your report source from that view

example:

Code:
CREATE VIEW VW_TEST
AS
SELECT     OrderID, SUM(CONVERT(money, (UnitPrice * Quantity) * (1 - Discount) / 100) * 100) AS Subtotal
FROM         dbo.[Order Details]
GROUP BY OrderID

Jaime E. Maccou
Applications Analyst





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum of the fields in the report footer sudagnr Crystal Reports 0 April 3rd, 2008 07:07 AM
How to sum satish_baleri XSLT 6 October 24th, 2007 03:43 AM
Help: Running Sum (or Cumulative Sum) timdasa VB Databases Basics 1 August 22nd, 2006 03:12 PM
need sum help! jbik BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 December 20th, 2004 05:27 PM
SUM or What bertlf Pro VB Databases 2 November 29th, 2003 02:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.