Better way to make a report

P

polman

Hello to all!
I have troubled for a while about the more convenient way to make a
report. Here is my situation.
I try to make a database for the radiology department where I am
working in, so one thing that I need is to print a exam report for the
patient currently on the "frmPatient" and for a specific examination
currently on "frmExam" (which is a subform of the frmPatient). For this
I 've made a query that retrieves all the needed information for the
report (ID, Name, Exam, ClinicalHistory, Radiologists..etc.) and to
returns only the current patient.
My question: Is this (make a query) the best way to do it (print a
report for the current patient only)?
I mean all the information is right front of me on the form and subform
why should bother retrieving them from the table using queries, and not
extract them from the controls itself, and then send them on a report.
Please note that in my future plan is to create a word document from
that.
If this is better way how can I implement this? (e.x. make a table on
the fly containing all needed infos and set it as source for the report
or fill one by one all the report's fields).
Finally, I this is not trouble for you please guide me on how to
accomplish this in the most efficient way.
I hope that you understand what I am try to do...:)
Thank you in advance.
Manolis.
 
A

Allen Browne

In general, the best solution is to make the query, and the report based on
that query.

A form is generally designed for data entry, so is usually bound to one
table (where the data is to be saved), with subforms for related tables, and
combos for lookups.

A report is generally designed for printing data. You can't drop down your
combos, and you don't need it to be updatable. So, a query that combines the
main table, related tables and lookups is just fine for a report.

If you do plan to export to Word, you will lose any graphical components
(lines, logos, etc), but that's probably the best choice if you want the
text of the report to be editable. If you don't need to edit it, you can
export a snapshot.
 
A

Al Campagna

polman,
Sounds like you've got your query all worked out, and that it is delivering the
correct recordset to your report... you just want to know if a query is the correct
vehicle to control the report?
Yes, it is. No doubt about it...
All reports require a raw table (rarely used) or a criteria query to control the
recordset sent to the report for printing. While there are cases where report data may be
garnered occasionally from an open form, it is not the "primary" vehicle for report
generation. The query is...

However, it is not necessary to create a separate "stand alone" query to do that. Just
click on a blank RecordSource for the report, click the 3 dot (...) build button on the
right, and build the query right there...within the report. I call it a "resident"
query, because no stand alone query is created... it exists only within the report, and
operates on your data every time the report is run.

The problems with trying to use the "on the fly" "displayed" data from the open form to
generate the report (particularly on a One to Many form) are too numerous to go into.
It's more trouble, and more problem prone by far, than using a query as the RecordSource
for a report.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


Exam ID
 
P

polman

Al and Allen Thank you both for your replies. Both answers are very
clear
Allen, the only reason to make a word document for the report is for
convenience, since, until now, all the reports are written in word. I
understand this is not a good practice and I will try to convince my
colleagues not to do so. The snapshot is a good idea. I think it will
work for me.
Yes Al. My report works fine with the query but since I 'm a new in
access I was wondering if there is a better way for my task (I was
scared by the SQL statement that access build for the query in order to
supply the report the information needed...). Good idea to make the
query a part of the form I will do this.

Thank you for one more time for your time...
 
G

Guest

i wouldn't use a query....
open a report in design mode and link the data to your form. leave the form
open, makes things easier. in your field list you will see all the fields
from your form and subform(s). just lay them out as you wish. when done
create a button on your form that prints your newly made report. i hope i
haven't misunderstood your question because this is a very easy way to do
things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top