home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / informix / 3031 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  3.3 KB

  1. Path: sparky!uunet!europa.asd.contel.com!emory!emory!not-for-mail
  2. From: alan@effluvia.den.mmc.com (Alan Popiel)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re:  First Time Informix User
  5. Date: 21 Jan 1993 19:53:13 -0500
  6. Organization: Mailing List Gateway
  7. Lines: 65
  8. Sender: walt@mathcs.emory.edu
  9. Distribution: world
  10. Message-ID: <1jnghpINNd6v@emory.mathcs.emory.edu>
  11. Reply-To: alan@effluvia.den.mmc.com (Alan Popiel)
  12. NNTP-Posting-Host: emory.mathcs.emory.edu
  13. X-Informix-List-ID: <list.1807>
  14.  
  15. Debashis Dutta (ddutta@tiguex.cs.unm.edu) writes:
  16.  
  17. ->From: ddutta@tiguex.cs.unm.edu (Debashis Dutta)
  18. ->Subject: First Time Informix User
  19. ->Date: Thu, 21 Jan 1993 14:52:31 GMT
  20. ->Reply-To: ddutta@tiguex.cs.unm.edu (Debashis Dutta)
  21. ->Organization: Computer Science Department, University of New Mexico
  22. ->
  23. ->Hello World :
  24. ->
  25. ->I have just started using informix and still trying to get some ideas about
  26. ->how strong a DBMS package it is. I am having some problems in printing Ace
  27. ->reports......well all I want to do is to have various font size options 
  28. ->built within the report. That is to say, someone who wants Courier 10 cpi bold
  29. ->format to print out the header of the report, how will he do that or say I
  30. ->want to use the compressed printing mode of the hp laserjet III printer.....
  31. ->now I can change the font setting of the printer manually and then send the
  32. ->job for printing....but can I built this within the report itself.
  33. ->
  34. ->What I have tried so far is to write the report in a file, then pass the
  35. ->file thru a shell script that sends the <ESC> sequence to the printer to 
  36. ->change the font size.....but I want everything built within the program
  37. ->so that a less knowledgeable user can just printit everytime without any
  38. ->problems.
  39. ->
  40. ->I would really appreciate if some one can guide me to incorporate this within
  41. ->the program itself. My email is ddutta@unmvax.cs.unm.edu
  42. ->
  43. ->Dev Dutta
  44. ->University of New Mexico, CS Dept.
  45.  
  46. Alan Popiel (alan@den.mmc.com) replies:
  47.  
  48. I don't use Ace, so I don't know how to do what you ask in Ace.   HOWEVER,
  49. it is really pretty easy to do what you ask in the 4GL report writer, which 
  50. is similar to, but more powerful than, the stand-alone ACE report writer.  
  51. Maybe you can do the same thing in Ace.
  52.  
  53. When using the 4GL report writer, you can output your control codes by using 
  54. a PRINT statement.  However, the 4GL compiler will not let you print certain 
  55. control codes as constants, since it recognizes that they are special, and it 
  56. calls them "unprintable" or "non-printing" characters (I forget the exact 
  57. wording of the error message).
  58.  
  59. The trick is to do the following:
  60.  
  61. DEFINE    code_on     CHAR(3),
  62.     code_off CHAR(3)
  63.  
  64. LET code_on  = ASCII 27, "W", ASCII 1    { example Epson print codes }
  65. LET code_off = ASCII 27, "W", ASCII 0
  66. PRINT code_on, rest_of_data, code_off
  67.  
  68. Once the control codes are hidden inside the variables, the compiler doesn't 
  69. know they are special, the printer accepts the codes, and prints as dictated.
  70.  
  71. Regards,
  72. Alan
  73. +------------------------------+---------------------------------------+
  74. | R. Alan Popiel               | Internet: alan@den.mmc.com            |
  75. | Martin Marietta, LSC         | ( Please note: My opinions do not   ) |
  76. | P.O. Box 179, M/S 5422       | ( represent official Martin policy. ) |
  77. | Denver, Colorado 80201-0179  | Voice: 303-977-9998                   |
  78. +------------------------------+---------------------------------------+
  79.  
  80.