473,406 Members | 2,467 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,406 software developers and data experts.

On Print Event

lee123
556 512MB
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:

Expand|Select|Wrap|Line Numbers
  1. Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
  2.  
  3.     If IsPaid Then
  4.         orderstatuslabel.Caption = "PAID"
  5.     Else
  6.         orderstatuslabel.Caption = "PENDING"
  7.     End If
  8.  
  9. End Sub
i don't know if this will help!

lee123
Mar 6 '08 #1
3 4195
mshmyob
904 Expert 512MB
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,

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:

Expand|Select|Wrap|Line Numbers
  1. Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
  2.  
  3.     If IsPaid Then
  4.         orderstatuslabel.Caption = "PAID"
  5.     Else
  6.         orderstatuslabel.Caption = "PENDING"
  7.     End If
  8.  
  9. End Sub
i don't know if this will help!

lee123
Mar 6 '08 #2
lee123
556 512MB
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
Mar 7 '08 #3
mshmyob
904 Expert 512MB
Ok. You will need to send the print job twice. After the first print job change the control to say 'file'.

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
Mar 7 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Alan | last post by:
While not rs.eof <td><%=rs("InvoiceNo")%></td> <td><%=rs("Name")%></td> <td><a href="InvoicePrint.asp?WInv=<%=rs("InvoiceNo")%>"></a></td> <td>Print this invoice</td> rs.MoveNext Wend Now...
0
by: Phuff | last post by:
I need to be able to capture events thrown by the Amyuni print driver( a 3rd parter pdf conversion product), and it has specified numbers which I believe I understand to be thw wParam of the print...
1
by: Richard Hollenbeck | last post by:
I noticed I can't push a value into a text box by saying something like, "txtThisTextBox = intSomeVariable * 0.5" because I get an run-time error saying I can't assign a value to this object....
2
by: Craig Scheets | last post by:
I have writting an application that prints fine, but I have to do a TranslateTransform on the graphics in the OnPagePrint event to get place output at exact X,Y (the application prints checks and...
4
by: rom | last post by:
I need to print a html table when the user clicks on a key. the problem is that i don't want the printer dialog box to appear. i guess this is impossible in javascript so i think to create an...
5
by: Erik | last post by:
My main web page has a print button, and when pushed a new page should load, be printed automatically, and then the page should be closed. The control should be back at the main page and the user...
1
by: Krich | last post by:
I am still new on printdocument object. I have a problem try to print graphic object. I have one graphics object. How to print it? I try to print it in PrintPage event using this syntax...
5
by: Max ©® | last post by:
Hi all, I'm going crazy... I've report with subreport. I want simply move some objects on report and subreport according to fields value. For example I want hide a label when a field is empty. ...
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
11
by: Gord | last post by:
When I open a certain report, it runs some code that generates the records that will be displayed in that report. This works fine. When I go to print preview the report it appears that the code...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.