Hi,
I have a report that has a query as its record source.
The query picks up records from a table that meet certain criterion.
The report then counts how many records there are for each key (room
number) - but does some calculating by date to see whether to increment
the count.
Then the report lists the Room Number, and the Count.
The way it is now, if the count for a room number is 4, it will
display:
Room Count
-------- --------
200 1
200 2
200 3
200 4
What I'd like to do is ONLY print the last line.
I don't think I can do this via my query, because Count is not on my
table and is calculated in my report's VBA. The logic I use is: if
one record and the next have an ActivityDate within 11 days of each
other, the count is 1. If it is over 11 days, the count is 2. And so
on with the next record, etc. In my VBA, I check record-by-record. I
don't think this logic can be done in a query, can it?
Is there a way to do this, either by my report (and only print the last
detail line for a room number), or by query?
Thanks so much for any help!
Lori 1 1735
lorirobn wrote:
Hi,
I have a report that has a query as its record source.
The query picks up records from a table that meet certain criterion.
The report then counts how many records there are for each key (room
number) - but does some calculating by date to see whether to increment
the count.
Then the report lists the Room Number, and the Count.
The way it is now, if the count for a room number is 4, it will
display:
Room Count
-------- --------
200 1
200 2
200 3
200 4
What I'd like to do is ONLY print the last line.
I don't think I can do this via my query, because Count is not on my
table and is calculated in my report's VBA. The logic I use is: if
one record and the next have an ActivityDate within 11 days of each
other, the count is 1. If it is over 11 days, the count is 2. And so
on with the next record, etc. In my VBA, I check record-by-record. I
don't think this logic can be done in a query, can it?
Is there a way to do this, either by my report (and only print the last
detail line for a room number), or by query?
Thanks so much for any help!
Lori
Yes, it can be done. But you'll need to know how to program. See
"MoveLayout , NextRecord, PrintSection Properties" in help or create a
code mode and enter/highlight the word MoveLayout and press the F1 key
to get to the help topic.
You'd probably need to create a group on Room. Have a global variable
the is reset when a new room is found. You'll need to know how the
count of the rooms per group. Then you simply move to the next record,
but the MoveLayout and PrintSections set to false if not equal to the
last room record.
Or, in the recordsource query of the report call a function that returns
a true or false on whether or not the record is to be printed.
PrintRec : DoIPrintIt([Room], [RoomRecID])
and write a public function to return true or false to print. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Paul Watson |
last post by:
I thought that using a comma at the end of a print statement would suppress
printing of a newline. Am I misunderstanding this feature? How can I use
print and not have a newline appended at the end?
C:\src\projects\test1>python -c "import sys;print sys.version, 'running on',
sys.platform"
2.3.4 (#53, May 25 2004, 21:17:02) running on
win32
C:\src\projects\test1>python -c "print 'here'," >jjj
|
by: Marcin Ciura |
last post by:
Here is a pre-PEP about print that I wrote recently.
Please let me know what is the community's opinion on it.
Cheers,
Marcin
PEP: XXX
Title: Print Without Intervening Space
Version: $Revision: 0.0 $
|
by: baustin75 |
last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie
only when debugging in php designer 2005
--------------------------------------------------------------------------------
Hello,
I have a very simple problem but cannot seem to figure it out. I have a
very simple php script that sends a test email to myself. When I debug
it in PHP designer, it works with no problems, I get the test email. If
|
by: Bryan Ax |
last post by:
I have a page that has two copies of the same control in it. The
control is:
BorrowerControl
the two references to it in the page are
bControl1
cobControl1
|
by: cendrizzi |
last post by:
Hi all,
I've read some stuff on this but can't seem to come up with a solution
that works right. I have a semi-mature (yet very large and robust)
internal web application that currently only works with one window open
at a time.
Maybe I'm abusing the use of $_SESSION but I have data entry processes
split up in several steps (which is required since depending on what
was put before determines what pages will be shown after). To store...
| |
by: Sparkee |
last post by:
I am in a conundrum and I am not sure how to do what I want to do.
In short in a report I want either a) everything in one long line or b) only the detail section to be columnar
More detail on the problem...
In a report, I would like the following to occur:
In one line:
Name1, Address1, EventAM, EventPM
Name2, Address2, EventAM, EventPM
|
by: notejam |
last post by:
Hi,
I am having a problem with print statements always cause a line feed.
I need to print a line of text, then the next print statement will
start printing where the last one stopped rather than drop down a line.
In basic we can do this with print "texst"; followed by next command
print "text2"
So how do I do that in python?
|
by: Edward K Ream |
last post by:
The pros and cons of making 'print' a function in Python 3.x are well
discussed at:
http://mail.python.org/pipermail/python-dev/2005-September/056154.html
Alas, it appears that the effect of this pep would be to make it impossible
to use the name 'print' in a backward compatible manner. Indeed, if a
program is to compile in both Python 2.x and Python 3.x, the print function
(or the print statement with parentheses) can not use the...
|
by: gregpinero |
last post by:
I'm running code via the "exec in context" statement within a much
larger program. What I would like to do is capture any possible
errors and show a pretty traceback just like the Python interactive
interpreter does, but only show the part of the traceback relating to
the code sent to exec.
For example here is the code I'm using:
try:
exec code
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
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();...
|
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...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |