473,783 Members | 2,317 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Report Totals

Tom
All:

I have a report that lists quantities of stuff used over the course of
a year and it is grouped on each month. In the group footer I want to
insert the total for the month - easy stuff so far.

The part that has me stumped is that the units of use for each record
may not be the same (e.g., we may have one record at 5 lbs and one
with 4 kg). I've gone to some length in the forms for entering data
to prevent this, but I subscribe to the philosophy that nothing is
idiot proof - better idiots are unleashed very day. So what I want to
do is hide the totals if all the units aren't the same for the month
(since they would be meaningless). What is the best way to accomplish
this?

I've thought about running a query against the reports recordsource to
give me a count of the number of unique units - if I get more than 1,
I suppress the totals for all the months, but am not sure that is the
best approach.

For example:

I want totals in this case:
Jun 2007
Material 1 300 gal 3000 lbs
Material 2 200 gal 2500 lbs
Total 5500 lbs

I don't in this case:
Jun 2007
Material 1 300 gal 3000 lbs
Material 2 200 liter 250 kilograms

Any thoughts? Thanks

Tom

Jun 11 '07 #1
2 2249
Tom <rt*****@swbell .netwrote in
news:11******** **************@ k79g2000hse.goo glegroups.com:
All:

I have a report that lists quantities of stuff used over the
course of a year and it is grouped on each month. In the
group footer I want to insert the total for the month - easy
stuff so far.

The part that has me stumped is that the units of use for each
record may not be the same (e.g., we may have one record at 5
lbs and one with 4 kg). I've gone to some length in the forms
for entering data to prevent this, but I subscribe to the
philosophy that nothing is idiot proof - better idiots are
unleashed very day. So what I want to do is hide the totals
if all the units aren't the same for the month (since they
would be meaningless). What is the best way to accomplish
this?

I've thought about running a query against the reports
recordsource to give me a count of the number of unique units
- if I get more than 1, I suppress the totals for all the
months, but am not sure that is the best approach.

For example:

I want totals in this case:
Jun 2007
Material 1 300 gal 3000 lbs
Material 2 200 gal 2500 lbs
Total 5500 lbs

I don't in this case:
Jun 2007
Material 1 300 gal 3000 lbs
Material 2 200 liter 250 kilograms

Any thoughts? Thanks

Tom
In the report declarations, dim two variables per column, say
st1stum1 as string
bmixedUM1 as boolean.

In the month header_Format event, grab the first UM for the
month, and set bMixedUM to false.

In the details_format put something like
if me.UM <stFirstUM1 then bMixedUM1 = true

then you can code your total.visible property to false if
bMixedUM is true.

However, another solution is to build a lookup table of
UM_Equivalences .
with all your UnitSets,
so that if you want to total on gallons
um Factor
GAL 1.00
Liter 3.55
DRUM .0181818

so you can multiply the measurement by the factor
and get a valid total.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 12 '07 #2
Tom
On Jun 11, 6:44 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
Tom <rtmn...@swbell .netwrote innews:11****** *************** *@k79g2000hse.g ooglegroups.com :


All:
I have a report that lists quantities of stuff used over the
course of a year and it is grouped on each month. In the
group footer I want to insert the total for the month - easy
stuff so far.
The part that has me stumped is that the units of use for each
record may not be the same (e.g., we may have one record at 5
lbs and one with 4 kg). I've gone to some length in the forms
for entering data to prevent this, but I subscribe to the
philosophy that nothing is idiot proof - better idiots are
unleashed very day. So what I want to do is hide the totals
if all the units aren't the same for the month (since they
would be meaningless). What is the best way to accomplish
this?
I've thought about running a query against the reports
recordsource to give me a count of the number of unique units
- if I get more than 1, I suppress the totals for all the
months, but am not sure that is the best approach.
For example:
I want totals in this case:
Jun 2007
Material 1 300 gal 3000 lbs
Material 2 200 gal 2500 lbs
Total 5500 lbs
I don't in this case:
Jun 2007
Material 1 300 gal 3000 lbs
Material 2 200 liter 250 kilograms
Any thoughts? Thanks
Tom

In the report declarations, dim two variables per column, say
st1stum1 as string
bmixedUM1 as boolean.

In the month header_Format event, grab the first UM for the
month, and set bMixedUM to false.

In the details_format put something like
if me.UM <stFirstUM1 then bMixedUM1 = true

then you can code your total.visible property to false if
bMixedUM is true.

However, another solution is to build a lookup table of
UM_Equivalences .
with all your UnitSets,
so that if you want to total on gallons
um Factor
GAL 1.00
Liter 3.55
DRUM .0181818

so you can multiply the measurement by the factor
and get a valid total.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account fromhttp://www.teranews.co m- Hide quoted text -

- Show quoted text -
Thanks for the solution - much more elegant than my initial thoughts.

Tom

Jun 12 '07 #3

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

Similar topics

3
2108
by: John Baker | last post by:
Hi: I have a situation where I have a series of time records (one or more per day) for a number of projects. Each record has an identification for the activity conducted during the period recorded. For any project, the activity may be one of many things, and the activities may vary by project number. I need to run a report and end up with a list of all the times reported, and totals by the project number and the activity, as well as...
2
4259
by: Steven Stewart | last post by:
Hi there, I don't have a lot of experience with this so I am looking for some help. I have a form that allows a user to choose the options she wants. How do I set it up so that the report generated reflects those options? Another issue is that I want the report to show totals. These totals are organized with columns "Programs" and "Levels of Processing." The
1
17673
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to Create a Dynamic Crosstab Report PRODUCT :Microsoft Access PROD/VER:1.00 1.10 OPER/SYS:WINDOWS
1
4515
by: fixedpower | last post by:
I have an Access 2000 DB for a financial company. I have the table structure completed, but I am having trouble with the report. Basically, I have a Client tbl, a StockShares tbl, and a StockOptions tbl. One client can have many types of StockShares and StockOptions. I need to detail the StockShares and StockOptions on one page. The hierarchy should look like this: CLIENT NAME StockShares
8
2205
by: sara | last post by:
Hi - I have looked at all posts and tried both Allen Browne's Report Sorting at run Time ( Select Case Forms!frmChooseSort!grpSort Case 1 'Name Me.GroupLevel(0).ControlSource = "LastName" Me.GroupLevel(1).ControlSource = "FirstName") ..... And another post that was OrderByOn = True and setting the sort Order.
4
3134
by: lorirobn | last post by:
Hi, I have a report displaying items that are missing from a room. I created 2 queries, the first getting the items IN the room, and the second being an "unmatched" query that references the first query where Item is Null. I use a subreport for the details, and the results display correctly. However, the Report_Details event of the subreport is executed about 2 or 3 times more than I would expect (I think 3 times when I have a
4
5661
by: Micheal | last post by:
Greetings Access Group, Being relatively new to Access, I try to work through problems on my own and have been very successful, although I have a conundrum that I have been working on for two days (total 10 hours) and I have yet to resolve it. please excuse me for my lack of terminology, I will try to provide you with the best of information. I currently have a report that contains 2 totals and the percentage of the difference of the 2...
5
3948
prn
by: prn | last post by:
Hi folks, I'm looking for a little advice here. I need to create a report that is totals only, with no detail records. I have a database with a lot of individuals (people) and the report has to have some overall totals, totals per state, totals by gender, race/ethnicity, and several other criteria. This report does not need to (and should not) report on each individual, just the totals. I can create expressions for each of the items I...
0
1313
by: zufie | last post by:
Hi, Here are the specifics of the Report which I am to create. Reports for Callers - from Begin Date to End Date of Reporting Period and by respective County: * List Language preference of Callers - Top 4 languages and their respective totals. * Age Range of Callers - (18 yrs and under, 18-24 yrs, 25-44 yrs, 45-64 yrs, greater than or equal to 65 yrs) - And their their
14
7860
ollyb303
by: ollyb303 | last post by:
Hi, I am trying to create a dynamic crosstab report which will display number of calls handled (I work for a call centre) per day grouped by supervisor. I have one crosstab query (Query1) which has the following fields: SPID (supervisor ID), total:group by, as row heading Date, total:group by, as column heading Calls handled, total:sum, as value Date, total:where, criteria between and - this is taken from a form,
0
9643
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
9480
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
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6735
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
5378
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2875
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.