Results 1 to 13 of 13
  1. #1
    Star Lounger
    Join Date
    Jan 2002
    Location
    Washington State
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print Report Multiple Times (2000 SR-3)

    Hello.

    I have a report that, when printed, will print the report three times. However, on each printout I need to change one labels caption. ("File Copy", "Customer Copy", etc...)

    I thought I could find something like this in the KB, but the closest I came was an article about how to print the detail section multiple times - not the entire report.

    I suspect that I need to use PrintCount, but I'm not sure of the syntax.

    Any ideas?

    Thanks!
    Sam

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Print Report Multiple Times (2000 SR-3)

    What you could do is to set up the name of the label in the OpenArgs argument. Then in the report's OnOpen event you can setup the label here.

  3. #3
    Star Lounger
    Join Date
    Jan 2002
    Location
    Washington State
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Report Multiple Times (2000 SR-3)

    Thanks for the idea.

    That's true, that would work, but I'm trying to do all this with one print job. For example, the user clicks once to print the report. Then chooses which printer to print to. Then, using VBA, I'll print the report three times, changing the caption on each. But I don't want to actually open the report three separate times because that would require the user to choose their printer three times every time they print this report.

    I was hoping that I could have the user click to print the report, and choose the printer - ONCE. And then I would actually have the report print three copies, with three different labels.

    If this report was printed on the users default printer I could print the report to the default printer without asking. But this report might be printed to different printers, so I need to keep that option open.

    Again, thanks for you help.
    Any further thoughts?
    Sam

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print Report Multiple Times (2000 SR-3)

    Pat,

    I thought of that too, but OpenArgs for reports was only introduced in Access 2002. The poster mentioned Access 2000 in the subject. <img src=/S/sad.gif border=0 alt=sad width=15 height=15>

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Print Report Multiple Times (2000 SR-3)

    Close but not close enough. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print Report Multiple Times (2000 SR-3)

    Any chance of having the user choose the printer before opening the report three times?

  7. #7
    Star Lounger
    Join Date
    Jan 2002
    Location
    Washington State
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Report Multiple Times (2000 SR-3)

    Thanks, Hans.

    That might be the best route. Could you direct me to some code that I could use to call up the printer dialog box, store the printer (as a variable?), and then run the report using the selected printer?

    Thanks again!
    Sam

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Print Report Multiple Times (2000 SR-3)

    Is this a single page report and do you *always* need three copies? If the answer is yes, then just format it with three pages and change the label based on which page is printing.
    Charlotte

  9. #9
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Print Report Multiple Times (2000 SR-3)

    Here is some code that will do most of what you want. It prints out three copies, with the caption of a label changed each time. The only thing it doesn't do is let the user select a printer. It just uses the default printer.
    <pre>Private Sub CmdPrint_Click()
    On Error GoTo Err_CmdPrint_Click

    Dim stDocName As String
    stDocName = "rptone"
    DoCmd.OpenReport stDocName, acPreview
    Reports!rptone!label1.Caption = "file copy"
    DoCmd.PrintOut , acPrintAll, , acMedium, 1
    Reports!rptone!label1.Caption = "customer copy"
    DoCmd.PrintOut , acPrintAll, , acMedium, 1
    Reports!rptone!label1.Caption = "Office copy"
    DoCmd.PrintOut , acPrintAll, , acMedium, 1
    DoCmd.Close acReport, stDocName

    Exit_CmdPrint_Click:
    Exit Sub

    Err_CmdPrint_Click:
    MsgBox Err.Description
    Resume Exit_CmrPrint_Click

    End Sub
    </pre>

    Regards
    John



  10. #10
    Star Lounger
    Join Date
    Jan 2002
    Location
    Washington State
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Report Multiple Times (2000 SR-3)

    Charlotte,

    Thanks for your reply. I think this is the way to go. The report is a single page report, and yes, I will always need three copies.

    Pardon my ignorance though, but how do I format the report to three pages? I didn't realize there was a way to print each section multiple times. Could you please explain further?

    Thanks!
    Sam

  11. #11
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Print Report Multiple Times (2000 SR-3)

    If you only populate a single, fixed set of controls in the detail section (one record per report), then one way to do it is to duplicate the existing controls and put them after a page break in the detail section for each additional page.. If you have a group header, set its properties to repeat the section, and put your label on the page header. In the format event of the page header, you can test for Me.Page and use the result to set the caption of the label to "File Copy", "Customer Copy" or "Office Copy". There are other ways you could do it as well. Does that answer your question?
    Charlotte

  12. #12
    Star Lounger
    Join Date
    Jan 2002
    Location
    Washington State
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Report Multiple Times (2000 SR-3)

    Charlotte, thanks. This will work!

    AND THANK YOU to everyone who helped me with this issue!
    Sam

  13. #13
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Report Multiple Times (2000 SR-3)

    This is the way I would do it - and I think probably what Charlotte was saying:
    Create 3 pages on the one report
    Put exactly the same information on each page
    Change only the tile on each page ("File","Customer" etc.)
    Hope this helps.
    Peter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •