Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 October 15th, 2003, 09:03 AM
Authorized User
 
Join Date: Jun 2003
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default Report Formatting

I have a report, that can have any number of records that will print in the detail section, and a total in the detail footer. Is there any way, to create a field next to each record that will calculate the percentage of that field over the total of all records?

John
__________________
John
 
Old October 15th, 2003, 09:28 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Probably yes, but please define percentage. What calculation exactly would you like.

Sal
 
Old October 15th, 2003, 10:52 AM
Authorized User
 
Join Date: Jun 2003
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The value of the each line, divided by the total of all lines.

John
 
Old October 15th, 2003, 11:17 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Create a subquery in your data source that calculates the total for all items, then insert an unbound textbox into your report. There you can use the builder to create your calculation field.

As far as your footer question, use a bound textbox with the value in the calculation i just mentioned.
If you were only needing the grand total, it would be easier to just insert an unbound textbox in the footer of the report. This text box would be a copy of the item you would like to sumarize. After you paste it you just add =Sum(FIELDname) (or =Count()).



Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Formatting echovue Access 3 October 10th, 2006 01:48 PM
Report Formatting gamt67 Access 1 March 20th, 2006 11:15 AM
problem with formatting the crystal report tallapaneni Crystal Reports 1 May 24th, 2005 01:38 PM
Query/formatting problem in report mega Access VBA 8 September 16th, 2004 04:29 AM





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