On Print Event

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lee123
    Contributor
    • Feb 2007
    • 556

    #1

    On Print Event

    hi all, i have a report i have made and a form that goes with it in my form i have a check box field that is "PAID" so when the user checks it on the report will say "Paid" on it with a label i have made for it. now how can i get the report to print 2 invoices one that says "Paid" and one that says "File". i was looking at the report properties and i have found a event called "OnPrint" how would i use this to my advantage to get it to print 2 that says all of that? can this be done or is there another solution?

    just so you know what i have in the label i have this:

    Code:
    Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
        
        If IsPaid Then
            orderstatuslabel.Caption = "PAID"
        Else
            orderstatuslabel.Caption = "PENDING"
        End If
    
    End Sub
    i don't know if this will help!

    lee123
  • mshmyob
    Recognized Expert Contributor
    • Jan 2008
    • 903

    #2
    There are many ways to do it but you could try putting your code in the 'ON FORMAT' event instead of the 'ON PRINT' event.

    Let me know if that works. If it doesn't work let me know and I will give you some other suggestions.

    cheers,

    Originally posted by lee123
    hi all, i have a report i have made and a form that goes with it in my form i have a check box field that is "PAID" so when the user checks it on the report will say "Paid" on it with a label i have made for it. now how can i get the report to print 2 invoices one that says "Paid" and one that says "File". i was looking at the report properties and i have found a event called "OnPrint" how would i use this to my advantage to get it to print 2 that says all of that? can this be done or is there another solution?

    just so you know what i have in the label i have this:

    Code:
    Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
        
        If IsPaid Then
            orderstatuslabel.Caption = "PAID"
        Else
            orderstatuslabel.Caption = "PENDING"
        End If
    
    End Sub
    i don't know if this will help!

    lee123

    Comment

    • lee123
      Contributor
      • Feb 2007
      • 556

      #3
      maybe you misunderstood me but i want to know how i can get two invoices to print one that says "paid" and the other to say "file"

      The example code i put in my last post is what i have in a label that happens when i click on the checkbox on the form then when i click the print button on the form it lets me to preview the report before i print it and the invoice says "paid" for when it's checked and "pending" when it's not checked.

      but is there a way to get the printer to print 2 invoice by code to print one for "paid" and the other to print "file". i think i said that right? sorta for one invoice for me (file) and the other for the customer (paid)

      lee123

      Comment

      • mshmyob
        Recognized Expert Contributor
        • Jan 2008
        • 903

        #4
        Ok. You will need to send the print job twice. After the first print job change the control to say 'file'.

        Originally posted by lee123
        maybe you misunderstood me but i want to know how i can get two invoices to print one that says "paid" and the other to say "file"

        The example code i put in my last post is what i have in a label that happens when i click on the checkbox on the form then when i click the print button on the form it lets me to preview the report before i print it and the invoice says "paid" for when it's checked and "pending" when it's not checked.

        but is there a way to get the printer to print 2 invoice by code to print one for "paid" and the other to print "file". i think i said that right? sorta for one invoice for me (file) and the other for the customer (paid)

        lee123

        Comment

        Working...