|
-
Apr 5th, 2007, 07:20 AM
#1
Thread Starter
Member
[RESOLVED] printing problem ?
Can anyone tell me why the following work in some PC but not work in some PC ? We use Window XP SP2 and printing to the same printer. Actually, two out of five PC can do the printing in "Courier" but another three PC can only print the output in "Draft".
Code:
Printer.FontName = "Courier"
Printer.FontSize = 10
Last edited by Sammie; Apr 5th, 2007 at 07:53 AM.
-
Apr 5th, 2007, 07:47 AM
#2
Hyperactive Member
Re: printing problem ?
hey
can you write all the code?
-
Apr 5th, 2007, 07:49 AM
#3
Thread Starter
Member
Re: printing problem ?
snakeman,
here is all the code:
Code:
Printer.FontName = "Courier"
Printer.FontSize = 10
' Printer.Orientation = vbPRORLandscape
Printer.FontUnderline = False
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print Tab(C2); LTrim(cmbClientName.Text)
Printer.Print Tab(C1); LTrim(txtNoteNo)
Printer.Print Tab(C2); LTrim(cmbInsurerName.Text)
Printer.Print Tab(C1); LTrim(strAdd1); Tab(C2); txtClientCode
Printer.Print Tab(C1); LTrim(strAdd2); Tab(C2); cmbAECode.Text
Printer.Print Tab(C1); LTrim(strAdd3)
Printer.Print Tab(C1); LTrim(strAdd4); Tab(C2); DateValue(Date)
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print Tab(C1 + 12); LTrim(txtPolicy)
Printer.Print " "
Printer.Print Tab(6); cmbClass.Text; Tab(C1 + 12); LTrim(txtEndorsement); Tab(97); strFDD; Tab(103); strFMM; Tab(108); strFYY; Tab(115); strTDD; Tab(121); strTMM; Tab(126); strTYY
Printer.Print " "
Printer.Print Tab(C1 + 4); LTrim(cmbSumInsuredExchCode.Text) & LTrim(CStr(txtSumInsured))
Printer.Print Tab(C1 + 4); LTrim(txtSumInsuredText)
Printer.Print Tab(C1 + 4); LTrim(txtInsured); Tab(97); " "
Printer.Print Tab(C1 + 4); LTrim(txtType); Tab(97); " "
Printer.Print Tab(C1 + 4); " "; Tab(97); " "
Printer.Print Tab(C1 + 4); " "; Tab(97); " "
Printer.Print Tab(C1 + 4); " "; Tab(97); " "
Printer.Print Tab(C1 + 4); " "; Tab(97); " "
Printer.Print Tab(C1 + 4); " "; Tab(97); " "
Printer.Print Tab(C1 + 4); " "; Tab(97); " "
Printer.Print Tab(C1 + 4); " "
Printer.Print Tab(C1 + 4); " "; Tab(C2 + 3); LTrim(cmbPremiumExchCode.Text) & LTrim(CStr(txtPremium))
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print " "
Printer.Print Tab(C1 + 3); LTrim(txtBrief)
Printer.EndDoc
-
Apr 5th, 2007, 08:11 AM
#4
Re: printing problem ?
Do the other PCs have the Courier font installed?
What are the other differences between the machines?
-
Apr 5th, 2007, 08:25 AM
#5
Thread Starter
Member
Re: printing problem ?
Hack,
All PCs have Courier font but there are difference dated. I try to locate the difference between those two group of PC but I have no finding.
-
Apr 5th, 2007, 08:49 AM
#6
Re: printing problem ?
Then I would suspect there is your problem.
Change the font to something else and see if the problem persists.
Something like MS Sans Serif
-
Apr 5th, 2007, 08:53 AM
#7
Re: printing problem ?
Are you actually installing the application on the other PCs or did you just copy the exe?
-
Apr 5th, 2007, 09:01 AM
#8
Thread Starter
Member
Re: printing problem ?
MartinLiss,
Yes, I did only copy the exe file to those PCs.
-
Apr 5th, 2007, 09:03 AM
#9
Re: printing problem ?
Then I'm surprised this is the only problem you are having. I would expect your program to blow up all over the place.
You can't just copy the .exe to another PC.
You need to build a formal installation and setup package, and formally install your program in order for it to work.
-
Apr 5th, 2007, 09:08 AM
#10
-
Apr 5th, 2007, 09:10 AM
#11
Thread Starter
Member
Re: printing problem ?
Hack,
Would you give me more detail regarding on "formal installation" and "setup package". We developed this software in a junior school for use in the office, and we are not programmer.
-
Apr 5th, 2007, 09:13 AM
#12
Re: printing problem ?
Find the Package and Deployment Wizard (P&D Wizard) on your PC or CD and it will lead you through the process.
-
Apr 5th, 2007, 09:14 AM
#13
Re: printing problem ?
VB comes with the Package and Deployment Wizard. You probably don't have that listed, so in order to load it, click Add-Ins/Add-In Manager
Find "Package And Deployment Wizard" and click on it.
Check the Loaded/Unloaded and Load At Startup checkboxes
Click OK
Save your project and compile it.
Now, use the Package and Deployement Wizard to create your installation and setup package.
-
Apr 5th, 2007, 10:24 AM
#14
Thread Starter
Member
Re: printing problem ?
Hack,
Thanks, I will try it tomorrow.
-
Apr 5th, 2007, 10:54 AM
#15
Re: printing problem ?
Just so you know
 Originally Posted by Sammie
Actually, two out of five PC can do the printing in "Courier" but another three PC can only print the output in "Draft".
Courier is a font, Draft is a quality. You can print any font the printer can print in any quality the printer can print, as long as the computer has that font installed. It sounds as if 3 of the computers don't have the correct Courier font installed, which would be strange, since Courier is installed in Windows.
Are you using the same printer, set up the same way, on all computers? (Or printing to the same networked printer in all cases?)
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Apr 5th, 2007, 02:46 PM
#16
Re: printing problem ?
You can also use OTHER packaging tools. Check the FAQ's in the Application Deployment Forum for available choices...
-
Apr 5th, 2007, 04:22 PM
#17
Re: printing problem ?
randem is referring to Inno, which, like the P&D Wizard is free. He also wrote an Inno Script utility which makes Inno much easier to use.
-
Apr 10th, 2007, 03:28 AM
#18
Thread Starter
Member
Re: printing problem ?
MartinLiss,
It is the same network printer and all PC already have Courier font installed.
We found out the cause to the problem and can overcome the problem, the PCs can print correctly is setup with "Region and Language" in Singapore. But the PCs cannot print correctly is setup with "Region and Language" in Taiwan.
So the problem is sovled now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|