Printing problems with 4J's and Windows NT 4.0
Posted in 1998
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Networking & sqlhosts Configuration, Internationalization & Character Sets
Hello everybody. We are having printing problems with 4J's and Windows NT 4.0 At the present time we have the following hardware and software: =============================================================== -> Server: - Windows NT 4.0 with Service Pack 3 - 4J's Runtime 2.02.le6k3 - Informix Online Workgroup Server 7.23.TC1 -> Client: - Windows 95 4.00.950a - 4GL-Server 1.40 - Informix CLI 7.20 - Connection to the NT Server via the "Network drive" method -> Printer (shared in a Windows 95 PC): - Windows 95 4.00.950a - HP LaserJet 6P (using HP Printer drivers, shared as "\\\\servidor95\\hplj_6p") Printing possibilities: ====================== We tried 3 ways of sending reports to the printer: 1) As documented by 4J's: - Setting the DBPRINT environment variable to "FGLSERVER" and using the 4GL instruction: START REPORT report_name TO PRINTER 2) Sending directly to the shared resource: - Setting the DBPRINT environment variable to "FGLSERVER" and using the 4GL instruction: START REPORT report_name TO "\\\\\\\\servidor95\\\\hplj_6p" 3) In Windows 95 capture the LPT1 port to the shared printer (\\\\servidor95\\hplj_6p) and sending the report to LPT1 - Setting the DBPRINT environment variable to "FGLSERVER" and using the 4GL instruction: START REPORT report_name TO "LPT1" Problems found with the possibilites described above: ==================================================== Note ---- We use a lot of printer "escapes" in our reports (to change the font size, set/unset bold, set/unset double strike, set/unset underline, etc...) 1) DBPRINT=FGLSERVER, START REPORT report_name TO PRINTER With this method we can use two ways of sending the report to the printer: a) Using the HP printer driver... Problem: The driver tries to "translate" our escapes, and the report gets totaly messed up, because: - The driver does not correctly translate the printer escapes. - The driver does an extra(s) initializion(s) of the printer. - The drivers tries to position the "cursor" at the begining of each line: the result is an extra space between each line. - It doesn't print the last charactres of the line (normally only prints about half of each line). b) Using the "Generic/Text only" printer driver provided by Microsoft: Problem: The printer escape are "literaly" printed, as in the following example: - When we use the following instrucion (in a 4GL report): PRINT ASCII(27), "(s7B", # Bold on... "Testing", ASCII(27), "(s0B" # Bold off... - When gets printed is... .(s7BTesting.(s0B Instead of... Testing ... in BOLD NOTE: this happens with any combination of the Spool Settings (in the printer properties...) 2) DBPRINT=FGLSERVER, START REPORT report_name "\\\\\\\\computer\\\\shared_printer" With this method we have the following problem: - The print job is printed CORRECTLY, but when the LAST page is printed we get the famous Windows 95 blue screen with the following error message: An Exception 0E has occurred as 0028:C0FF2D1E in VxD MSTCP(01) + 000041AE. This was called from 0028:C004181C in VxD NDIS(01) + 00000D7C. It may be possible to continue normally. - The connection to the LAN is lost and the Windows 95 loses every TCP/IP service (ping, telnet, ftp, etc...). - NOTE: this situation ("blue screen" error, TCP/IP connections lost) only happend when we send a report with a LARGE number of printer escapes: - If we print invoices (lets say, about 200 printer escapes per page): - 1 invoice : OK! - 10 invoices: "blue screen" error... 3) Capture LPT1 to "\\\\computer\\shared_printer" DBPRINT=FGLSERVER, START REPORT report_name TO LPT1 With this method we have the same problems as in 2), but the user can only print to the printer over which the LPT1 port is captured. --------- SINFIC - Sistemas de Informacao Industriais e Consultoria, SA http://homepage.esoterica.pt/~sinfic Alberto Ribeiro sinfic@esoterica.pt aribeiro@sinfic.hpv.pt