473,626 Members | 3,265 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Zero suppression in a report on calculated fields

I have a Purchase Order where I have a calculated field called Price
that is calculated by multiplying Qty * Sales Price. I have 10 of
these fields...Price 1 - Price 10 (for each line of the PO). The price
fields are summed into another calculated field of Total Price (for the
whole purchase order). My problem is that on the purchase order when
there isn't anything in lines 2-9, zeros print on the PO in the Sales
Price and Price fields(since there isn't anything to calculate). Is
there a way to suppress the printing of the zeros?

Apr 3 '06 #1
2 4974
On 3 Apr 2006 12:30:49 -0700, Ryker wrote:
I have a Purchase Order where I have a calculated field called Price
that is calculated by multiplying Qty * Sales Price. I have 10 of
these fields...Price 1 - Price 10 (for each line of the PO). The price
fields are summed into another calculated field of Total Price (for the
whole purchase order). My problem is that on the purchase order when
there isn't anything in lines 2-9, zeros print on the PO in the Sales
Price and Price fields(since there isn't anything to calculate). Is
there a way to suppress the printing of the zeros?


You can use the Control's Format property to suppress 0's.
Set the Format property to:
#,##0.00;-#,##0.00,""

See Access help
Format Property + Number and Currency datatypes
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Apr 3 '06 #2
"Ryker" <ra*****@chocta w.org> wrote in
news:11******** *************@i 40g2000cwc.goog legroups.com:
I have a Purchase Order where I have a calculated field called
Price that is calculated by multiplying Qty * Sales Price. I
have 10 of these fields...Price 1 - Price 10 (for each line of
the PO). The price fields are summed into another calculated
field of Total Price (for the whole purchase order). My
problem is that on the purchase order when there isn't
anything in lines 2-9, zeros print on the PO in the Sales
Price and Price fields(since there isn't anything to
calculate). Is there a way to suppress the printing of the
zeros?

Your table structure is not normalized and is causing your
problem.
The PO table should contain the common info, like DateOfOrder,
Buyer, Vendor, etc.
You need a child table for the POLine data, one for each line on
the given PO. It needs the PO_ID,Poline, Article,
SalesPrice,Pric e,Qty, and other niceties like promisedate,

You set a relation from PO (one) to POLine (many).
Then you only have the number of real lines showing up on your
form and report, so you don't get the calculated zeroes where
they don't belong.
--
Bob Quintal

PA is y I've altered my email address.
Apr 3 '06 #3

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

Similar topics

7
2190
by: Jacob Barnett | last post by:
Access 2000 main report does not display subreport data in preview and may or may not print... sometimes. Usually, the entire report is fine. The behavior does not seem to depend on particular records or data and I have not found a reliable way to reproduce the behavior. The subreport can always be generated independently and always prints. There is data in both the main report and the subreport. The link child and master fields are...
3
1388
by: CSDunn | last post by:
Hello, I have a situation in which each record on a report has 40 fields, any one of which can contain a value of 'C', or 'I', or 'B'. I need to create one calculated field on the report that will COUNT the number of fields with a value of 'C'(and shows the integer result), and another calculation that will take the COUNT of the fields with a value of 'C' and divide that by the total number of fields. The second calculation would be...
6
4403
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
7
2414
by: manning_news | last post by:
I've got a report that's not sorting correctly. I build a SQL statement and assign it to the recordsource in the Open event, sorting the data the way the user chooses. The user can choose up to 3 sorts using a form that opens before the report opens. When the report previews, it ignores the users' sort request and always sorts by the primary key even though ORDER BY is explicity set to another field other than primary key. If I copy...
9
2699
by: StuckAndNoClue | last post by:
I'm pretty new to Access and VB and also know fairly little (more like nothing) about SQL. I've got three queries that shows similar fields, the main ones being: FIRST QUERY Name ID Active member (criteria: yes) Division in which a person belongs Preliminary First Aid (PFA) due in 30 days
4
7228
by: Jana | last post by:
Hi! I have an Access 97 report based on tables linked to an SQL back end. The report has 5 subreports in it (unfortunately unavoidable due to the nature of the report) and performance is quite slow. The query runs quickly and the report displays the first page in a short amount of time, but takes quite a while to format each page. This means it takes a long time to print the report (up to 50 mins to print around 360 pages!) as it...
7
3644
by: Sunil Korah | last post by:
Hi, I haven't used access reports much. I have a problem in getting the total of a group. I have 3 fields, ProgName (Program name), Pname (Participant's name) and PCategory (Participant category) PCategory can have values 'SC', 'ST' and 'Others'
1
1971
by: Hugh Middity2 | last post by:
Hello, We have a report printing numeric fields. Is it possible to suppress the field if the value is zero? Thanks
4
1630
by: RG52 | last post by:
Hello All I need some help: I have a small DB in access that has data entered via text boxes on a form. It is for confirming orders and such. There are five sets of entry boxes simply listed as Size, Qty, Num(not same as qty), Size II, Qty II, Num II, Size III you get the idea. Only the first set is required to be entered, and the remaing ones can be left blank (at least one or two will be 99% of the time). The text boxes all update to...
0
8265
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
8196
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8637
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
8364
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
8504
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
5574
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
4092
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...
0
4197
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1808
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.