473,803 Members | 3,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculations in reports

Hi,

I've been coming up against a failure of a report to display the result of a
simple calculation. I have realised that this calculation cannot take place
unless the field I am working on is displayed or is some way referred to in
the report. am I right in this? It seems odd if the field is there in the
underlying query.

Is this right? Is there a way round?
Nov 13 '05 #1
3 2266
"Calculatio ns" -- could you clarify? Are the calculations in event code, or
an expression in the Control Source of a Control? Control Source expressions
can refer to a field in the Report's RecordSource. For example, you can use
the Sum or Count functions in the Control Source of a Control to total or
count in the Group or Report Footer -- it's very common.

Performing calculations in Report event code can be problematic because the
events may fire more than once for a record, even just going forward. They
may fire quite a number of times in Report Preview, as you scroll forward
and backward. That is why calculations must be very, very carefully done, or
avoided in the Format and Print events.

Larry Linson
Microsoft Access MVP
Larry Linson
Microsoft Access MVP

"John M" <jo**@jmawer.de mon.co.uk> wrote in message
news:ck******** ***********@new s.demon.co.uk.. .
Hi,

I've been coming up against a failure of a report to display the result of a simple calculation. I have realised that this calculation cannot take place unless the field I am working on is displayed or is some way referred to in the report. am I right in this? It seems odd if the field is there in the underlying query.

Is this right? Is there a way round?

Nov 13 '05 #2
John M wrote:
Hi,

I've been coming up against a failure of a report to display the result of a
simple calculation. I have realised that this calculation cannot take place
unless the field I am working on is displayed or is some way referred to in
the report. am I right in this? It seems odd if the field is there in the
underlying query.

Is this right? Is there a way round?


Let's say your query has a field called Price. If you don't drop Price
onto the report, and attempt to reference it in a calc, you'll get an error.

So you can drop Price onto the report and make the Visible property = No.

Let's say you create a text box that is to display 10% of the price.
You would enter
=[Price] * .1

Nov 13 '05 #3
With the exception of column totals I normally do my calcs in the query.

It keeps the report simple.

gus

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
4680
by: lduperval | last post by:
Hi, I`m trying to do date calculations in three types of time zones: local, GMT and specified. The issue I am facing is that I need to be able to specify a date in the proper time zone, and I`m having a heck of a time doing so. I have created a form where I use drop downs do specify year, month, date, hour, minute and seconds. When the form is loaded, the dropdowns have to display the proper values for the current time zone type. This
2
2548
by: Willem | last post by:
Hi there, I'm sort of new with doing much record manipulation with queries. Up till now I've been programming VBA and doing record looping to get my results. This works fine but tends to get very, very slow as the number of records grows - somewhere in the number of 5,000,000. I imagine queries are much faster but am not quite sure if queries will do the trick. My problem:
2
425
by: Mark Lees | last post by:
I need some help setting up some date caluclations. Fields Include: A. DOB "date of birth" B. IFSPOrginal "Date IFSP is entered" C. IFSPRedo "Date 12 months into the future from IFSPOrginal" D. 2yrTransistion "Date 2yrs into the futre from DOB" I'm having difficulty creating the expressions for the (C)IFSPRedo and
1
1288
by: Dan Kean | last post by:
Hi all, I need to calculate some amounts on reports from rcords before they print, struggling doing so as it doesnt seem to run the calcs asks for parameters instead- do I need to do it as a form and print the forms?? All Help Appreciated :) Dan
6
3838
by: migueltxa | last post by:
Hi all, I have a problem with some calculations in MS Access 2003. I have 3 fields (Qty, Price and VolumeUSD) in a form and the following formula: VolumeUSD = Qty * Price. Qty and VolumeUSD are formated as "Standard" and Price as "General Number". Example: Qty = 4,400 ; Price = 39.1602
0
926
by: md100 | last post by:
I have calculations in a report to work out payments deducting tax for some unless tax deduction flag is given using the statement =IIf(=True,(),(-((/100)*22))) This value is being stored in a text box, "Text30" I am now creating another report, to show the total payments used, from the values of Text30.
1
1575
by: Grubsy4u | last post by:
Grubsy4u Newbie 7 Posts October 5th, 2007 11:31 AM #1 Report calculations --------------------------------------------------------------------------------
4
1459
by: Grubsy4u | last post by:
Does anyone know how i can do calculations for search query reports. How is this overcome because the search will be differrent with a different report every time. Is there a formular i can use in this situation??
9
2631
Catalyst159
by: Catalyst159 | last post by:
I have a form which is used to calculate residential Floor Area Ratio (FAR). The form is structured into seven parts as follows: Part A: Maximum FAR and Floor Area: Part B: Gross Floor Area of the main floors of the main house: Part C: Gross Floor Area of the basement or cellar: Part D: Gross Floor Area of the attic:
0
9703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6842
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.