Click to See Complete Forum and Search --> : [RESOLVED] printing problem ?
Sammie
Apr 5th, 2007, 07:20 AM
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".
Printer.FontName = "Courier"
Printer.FontSize = 10
snakeman
Apr 5th, 2007, 07:47 AM
hey
can you write all the code?
Sammie
Apr 5th, 2007, 07:49 AM
snakeman,
here is all the 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
Hack
Apr 5th, 2007, 08:11 AM
Do the other PCs have the Courier font installed?
What are the other differences between the machines?
Sammie
Apr 5th, 2007, 08:25 AM
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.
Hack
Apr 5th, 2007, 08:49 AM
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
MartinLiss
Apr 5th, 2007, 08:53 AM
Are you actually installing the application on the other PCs or did you just copy the exe?
Sammie
Apr 5th, 2007, 09:01 AM
MartinLiss,
Yes, I did only copy the exe file to those PCs.
Hack
Apr 5th, 2007, 09:03 AM
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.
MartinLiss
Apr 5th, 2007, 09:08 AM
Moved.
Sammie
Apr 5th, 2007, 09:10 AM
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.
MartinLiss
Apr 5th, 2007, 09:13 AM
Find the Package and Deployment Wizard (P&D Wizard) on your PC or CD and it will lead you through the process.
Hack
Apr 5th, 2007, 09:14 AM
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.
Sammie
Apr 5th, 2007, 10:24 AM
Hack,
Thanks, I will try it tomorrow.
Al42
Apr 5th, 2007, 10:54 AM
Just so you knowActually, 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?)
randem
Apr 5th, 2007, 02:46 PM
You can also use OTHER packaging tools. Check the FAQ's in the Application Deployment Forum for available choices...
MartinLiss
Apr 5th, 2007, 04:22 PM
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.
Sammie
Apr 10th, 2007, 03:28 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.