Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print n copies of a report

Status
Not open for further replies.

johnmc64

Programmer
Nov 23, 2000
6
0
0
CA
I have a dispatch system that sometimes requires multiple copies of a single Bill Of Lading (BOL). To print my BOL's, the dispatcher simply enters an optional code, ie. M16, (which is stored within the record) and a "Master" bol should be printed with n (16) copies.

I am not sure where or how I should do this.

On the continuous form, the dispatcher toggles a button to determine if a BOL is ready for printing. By the end of the day when all the bol's are marked, the dispatcher executes a printing option that allows BOL previews or direct printing. All data is passed to the report and I suspect that it is the report that determines if multiple copies are requested.

At the moment, the "Mn" feature is not active. Everything else works.

Does anyone have any suggestions? :cool:

JohnMc.
 
Use the PrintOut method on your form- it has a parameter for the number of copies to print. You can do this in VBA code or with a Macro.
 
Hmmm...thanks Pezamystik. I've tried that option before but it won't work here.

1. When a dispatcher marks are report for printing, it may be 6 hours before he actually wants the report to print.
With the PrintOut method, it implies that you are printing immediately.

2. Normally, the dispatcher previews all reports before they go to the printer. That means all reports are queued up and previewed before they actually print.

3. I think the action has to take place once ALL reports are passed to the actual REPORT (rptLadings). Perhaps on the "On Format" event of the report.

What do you think?

 
With VBA you could have an input box pop on an event for the report asking how many copies to print, OR you could get this from "To print my BOL's, the dispatcher simply enters an optional code, ie. M16, (which is stored within the record)"- where is this being stored at(a table, the form?)
 
Dear Pez,
The Mn value is stored within the data table (Historic reasons). Also, each of these copies will become an invoice, so to speak. Its easier to invoice "12345-M16" than "12345-1, 12345-3, 12345-3..."

I've tried the OnPrint and Onformat with a prompt. I can trap and extract the Mn value (no. of copies) but when I try to print with the same report I get an error:

2585 ... "this action can't be process within a form or report. ... invalid action for this property."

I can extract the num from the data (within the report) but I can't have it re-execute the report with n copies. I done data manipulation WITHIN reports many times but never for additional copies.

My system is so slick up to this point. I can queue up all the BoL's for preview or print; I can have the dispatcher print now or 8 hours from now; so far it is very simple for the dispatcher and it has to remain that way.

Please advise,

JohnMc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top