473,387 Members | 1,561 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How can I open a Report modally?

I have a report that prints a single record. Normally it's enter
one record, then print it.
This works great.

New requirement: Each record needs to be printed to an individual
..pdf file from any of several workstations. These will be digitally
signed. No problem except that I have been asked to batch all
existing records.

Wrote a code loop that calls the report for each record. Works
great if the acprintnormal option is used, I get a hard copy for
each record.

But: the .pdf driver name varies from machine to machine, so I cant
set it as "Specific printer" in setup.
I cannot force the users to make the .pdf driver their default
printer.

If I open the form in acreportpreview mode, the report opens on the
first record, and I can select the .pdf driver from the menu,
assign the filename, and save the printout, but the loop keeps
going through all the records, not opening them.

If I were looping through a form, opening it in modal view would
work, I tried it.

I don't want to redesign the form, nor modify a copy of the report.
I tried an idle loop, but can't figure how to break out of it early
when closing the report.

Any suggestions?

Bob Quintal
Nov 12 '05 #1
2 2747
Options here are:

1. If you're using Access 2000 or later you could use the printer object.
It allows you to change the printer a report goes to with ease. See help
for details

2. If you're not using Access 2000 or later you could use API calls to
change the default printer, print the report, and change it back (although
this is somewhat of a pain). The ever helpful Randy Birch has some info on
this at:

http://www.mvps.org/vbnet/index.html...fprinternt.htm

3. Use the report events. Instead of having a loop that just goes on it's
merry way, use the Report's close event to initiate the next report. Messy
but effective.

best I can do at 2351GMT!

"Bob Quintal" <bq******@generation.net> wrote in message
news:37******************************@news.teranew s.com...
I have a report that prints a single record. Normally it's enter
one record, then print it.
This works great.

New requirement: Each record needs to be printed to an individual
.pdf file from any of several workstations. These will be digitally
signed. No problem except that I have been asked to batch all
existing records.

Wrote a code loop that calls the report for each record. Works
great if the acprintnormal option is used, I get a hard copy for
each record.

But: the .pdf driver name varies from machine to machine, so I cant
set it as "Specific printer" in setup.
I cannot force the users to make the .pdf driver their default
printer.

If I open the form in acreportpreview mode, the report opens on the
first record, and I can select the .pdf driver from the menu,
assign the filename, and save the printout, but the loop keeps
going through all the records, not opening them.

If I were looping through a form, opening it in modal view would
work, I tried it.

I don't want to redesign the form, nor modify a copy of the report.
I tried an idle loop, but can't figure how to break out of it early
when closing the report.

Any suggestions?

Bob Quintal

Nov 12 '05 #2
"Ben Eaton" <be************@hotmail.com> wrote in
news:bo***********@news.wplus.net:

Thanks for the tips.
Options here are:

1. If you're using Access 2000 or later you could use the
printer object. It allows you to change the printer a report
goes to with ease. See help for details
Access 97 on WinNT 4.0
2. If you're not using Access 2000 or later you could use API
calls to change the default printer, print the report, and
change it back (although this is somewhat of a pain). The
ever helpful Randy Birch has some info on this at:

http://www.mvps.org/vbnet/index.html...defprinternt.h
tm
This is a pain, but it looks like the best choice.
3. Use the report events. Instead of having a loop that just
goes on it's merry way, use the Report's close event to
initiate the next report. Messy but effective.
Too messy. The report is called from several forms. It is a PITA to
resolve which parent called the report, and bypass the close event
if not from the correct source

best I can do at 2351GMT!
That's not an excuse if you are posting from Australia. (well maybe
hunger pangs are setting in.), but valid if you are sitting at a
desk in Moscow.

But your second suggestion looks like I might be able to do
something with it.

Bob Quintal

"Bob Quintal" <bq******@generation.net> wrote in message
news:37******************************@news.teranew s.com...
I have a report that prints a single record. Normally it's
enter one record, then print it.
This works great.

New requirement: Each record needs to be printed to an
individual .pdf file from any of several workstations. These
will be digitally signed. No problem except that I have been
asked to batch all existing records.

Wrote a code loop that calls the report for each record.
Works great if the acprintnormal option is used, I get a hard
copy for each record.

But: the .pdf driver name varies from machine to machine, so
I cant set it as "Specific printer" in setup.
I cannot force the users to make the .pdf driver their
default printer.

If I open the form in acreportpreview mode, the report opens
on the first record, and I can select the .pdf driver from
the menu, assign the filename, and save the printout, but the
loop keeps going through all the records, not opening them.

If I were looping through a form, opening it in modal view
would work, I tried it.

I don't want to redesign the form, nor modify a copy of the
report. I tried an idle loop, but can't figure how to break
out of it early when closing the report.

Any suggestions?

Bob Quintal



Nov 12 '05 #3

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

Similar topics

1
by: Jim | last post by:
I want to be able to open a window from javascript, collect some information in the opened window and have the opener block until the secondary window is closed. This would behave like the...
46
by: Steve | last post by:
Access97 Database The database is split into a frontend and backend and not connected to any other database. The database has an unbound report with 15 subreports. Some of the subreports include...
8
by: lauren quantrell | last post by:
When I open an Access form I can have no recordset specified, then in the form's OnOpen event I can do something like: Me.paramaters = "@SomeColumn = 22)" Me.recordsource = "dbo.sproc123" But I...
5
by: John Bowman | last post by:
Hi, I need some dialog handling help, I must be missing something obvious here but I can't figure out the solution to the following problem... Simple Win Forms app that has button on the form....
6
by: Shamin | last post by:
Hi, Thanks in advance for answering to my Question. I'm stuck with this problem and would really appreciate any help. I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a...
6
by: Gabriel Lozano-Morán | last post by:
I have always read that forms that are shown modally through ShowDialog() need to be disposed manually. Because they are not disposed automatically since you can still access the form after the...
12
by: Orchid | last post by:
Hello all, I have different version of reports which used for different months. For example, I am using report version 1 up to September, but we have some design changes on the report for October,...
4
by: rdemyan | last post by:
I'm using code from the following web page to open the API Browse Folder dialog http://www.mvps.org/access/api/api0002.htm It all works fine. But if the dialog box is open and the user closes...
1
by: Marcolino | last post by:
Hi, I'm new with VB.net and I comming from VB6 programming. I need to open a little form in Modal and child of MDI, with the top- left corner where the mouse has clicked. I tryed this code but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...

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.