hi i have made a data entry program and want to print my report in dot matrix printer.
but the printing speed is really slow.
but when i print my dos based reports the output is really fast.
do i need to do some settings.. plz help me out with my query
11 5680
plz help me some1.....its a big problem and i cant solve it
I see you've posted the question twice, so I'll continue here as the other thread has been closed.
Please ask the next time a moderator for action by means of a PM (Personal Message) and we'll try to find an expert to help you.
The OPEN commend can be used for opening the printer like: -
Open "LPT1:" For Output As #1
-
Print #1, strLine
-
You'll have to arrange however the way the strLine is filled.
Where is your data coming from ?
Nic;o)
I see you've posted the question twice, so I'll continue here as the other thread has been closed.
Please ask the next time a moderator for action by means of a PM (Personal Message) and we'll try to find an expert to help you.
The OPEN commend can be used for opening the printer like: -
Open "LPT1:" For Output As #1
-
Print #1, strLine
-
You'll have to arrange however the way the strLine is filled.
Where is your data coming from ?
Nic;o)
hi thanx for ur help my data is coming from access database only....
and ya plz tell me where to right the code.
it will be a great help coz i am stuck here and the printing process has became slow. i want the printouts only in Dot Matrix printer
Assuming you have a table "tblObject" and need to print all rows you can use this code: -
Dim rs as DAO.recordset
-
Dim strLine as String
-
-
set rs = currentdb.openrecordset("tblObject")
-
-
Open "LPT1:" For Output As #1
-
-
while not rs.eof
-
strLine = rs!fielname1 & " " & rs!fieldname2
-
Print #1, strLine
-
rs.movenext
-
wend
-
-
Close #1
-
Nic;o)
Assuming you have a table "tblObject" and need to print all rows you can use this code: -
Dim rs as DAO.recordset
-
Dim strLine as String
-
-
set rs = currentdb.openrecordset("tblObject")
-
-
Open "LPT1:" For Output As #1
-
-
while not rs.eof
-
strLine = rs!fielname1 & " " & rs!fieldname2
-
Print #1, strLine
-
rs.movenext
-
wend
-
-
Close #1
-
Nic;o)
but i dont wanna print a table i want to print a report....than what should i do. and where should i write the code
You asked for speeding up the process.
This is only possible by "redesigning the report" to be printed from scratch by using Print# statements.
The regular Access reports can't be speeded as they will be passed in a graphical mode and that requires (lots of) processing time.
Nic;o)
You asked for speeding up the process.
This is only possible by "redesigning the report" to be printed from scratch by using Print# statements.
The regular Access reports can't be speeded as they will be passed in a graphical mode and that requires (lots of) processing time.
Nic;o)
ok i understood the problem...now i have designed my report using the toolbox
how should i redesign the report now.
how can i use the print# statement to redesign it.
sorry for bothering too much but really need your help.
ok i understood the problem...now i have designed my report using the toolbox
how should i redesign the report now.
how can i use the print# statement to redesign it.
sorry for bothering too much but really need your help.
so there is no reply for my query
True, when you want to use the Access report, speeding up the matrix printer won't be possible :-(
Just switching to the "character mode" (read Print statements) will enable faster printing, but also a complete redesign probably of your report(s).
Perhaps manipulating the settings for Black and White or Grayscale on the printer properties might have some effect, but that's hard to manage from code.
Nic;o)
Hi, May be able to help, have in the past devised way of manipulating a query recordset to allow for faster printing through dot matrix/thermal printers.
The code I have below will allow you to run your query - which is what your report is based on within vba. - Private Sub Command20_Click()
-
-
Me.Requery
-
Me.Refresh
-
-
Dim strOrderId As String * 8 'specifies width of 8 characters
-
Dim strProductDescription As String * 20 'specifies width of 20 characters
-
Dim strQty As String * 4 'specifies width of 4 characters
-
Dim strUnitPrice As String * 8 'specifies width of 8 characters
-
Dim mydb As Database, myset As Recordset
-
Dim strsql As String
-
-
-
strsql = "SELECT * FROM Query1 WHERE [OrderId]" & " = " & Forms!form1!OrderId & ";"
-
-
Set mydb = CurrentDb()
-
Set myset = mydb.OpenRecordset(strsql)
-
-
'Open printer
-
Open "LPT1:" For Output As #1
-
-
Print #1, "Company Name"
-
Print #1, "Company Address1"
-
Print #1, "Company Address2"
-
Print #1, "Company Address3"
-
Print #1,
-
Print #1, "Telephone No"
-
Print #1, "Web Address"
-
Print #1,
-
Print #1, "Receipt No: " & OrderId
-
Print #1, Date
-
Print #1,
-
-
-
'Titles
-
LSet strOrderId = "OrderId"
-
LSet strProductDescription = "ProductDesciption"
-
LSet strQty = "Qty"
-
LSet strUnitPrice = "UnitPrice"
-
-
Print #1, strOrderId & strProductDescription & strQty & strUnitPrice
-
Print #1,
-
-
'Print each line of recordset
-
-
myset.MoveFirst
-
Do Until myset.EOF
-
LSet strOrderId = myset![OrderId]
-
LSet strProductDescription = myset![ProductDesciption]
-
LSet strQty = myset![Qty]
-
LSet strUnitPrice = myset![UnitPrice]
-
-
'Concatenate all of the variables together as in the following:
-
Print #1, strOrderId & strProductDescription & strQty & strUnitPrice
-
-
myset.MoveNext
-
-
Loop
-
-
Print #1,
-
Print #1,
-
Print #1,
-
-
'Printer Autocutter
-
Print #1, Chr$(27) & Chr$(100)
-
'Cashdraw Open
-
Print #1, Chr$(7)
-
-
'Close LPT1
-
Close #1
-
-
myset.Close
-
mydb.Close
-
-
MsgBox "Receipt printed"
-
-
End Sub
hi,
i already use this code, but when i try to run error run time error 3061 : too few parameters. Expected 2. Please advice
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Grim Reaper |
last post by:
I print mailing labels out of Access 2000 databases about 3 to 4 times a
week. I have been having problems with one thing since I have been printing
mailing labels.
I print mailing labels by...
|
by: Salad |
last post by:
I'm developing an app where the print output will be on a dot-matrix
printer. I suppose the printers will either be an Epson or Okidata, not
really sure at this point.
I, unfortunately, do not...
|
by: cyranoVR |
last post by:
This is the approach I used to automate printing of Microsoft Access
reports to PDF format i.e. unattended and without annoying "Save As..."
dialogs, and - more importantly - without having to use...
|
by: Ryan Gregg |
last post by:
I'm working on a project where I need to be able to print a single line at a
time to a dot matrix printer. Essentially we have a log printer and each
time an event occurs on the system I need to...
|
by: DazedAndConfused |
last post by:
I have a 8.5 x 11 landscape document with about 1/4 inch of space on the
left and right where there is no print.
The document displays perfect in print preview, but when I print it, about
1/2 inch...
|
by: Paul H |
last post by:
I am developing a database where some reports need to print to a laser and
some need to print to a dot matrix printer.
I am not interested in how to do this programmatically, I will let the user...
|
by: Rich Kayton |
last post by:
I have an application that is currently a DBASE/Clipper application. We print
out a variety of custom labels on Epson DOT matrix printers. I would like to
be able to print these labels.
I am...
|
by: Ron |
last post by:
Hi All,
I've got a requirement to print an existing statement printing report to
another printer that's set up to print on a wide-carriage, bottom-fed
dot-matrix printer. That printer's sole...
|
by: Brett |
last post by:
I have an ASP.NET page that displays work orders in a GridView. In that
GridView is a checkbox column. When the user clicks a "Print" button, I
create a report, using the .NET Framework printing...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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: 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...
| |