Re: can a report (write using informix-4gl) be printed out by using laser printer ?how?
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
fly wrote: > i would like to know that whether is it possible to use a laser printer to > print out a report that already writen using informix 4gl? > if possible, how can i make it? > does it need other softwares to help me to make it? > if it does,what's the software that is suitable for it Yes. Send the report to the line printer spooler, either with REPORT TO PRINTER or REPORT TO PIPE "printer-spooler-program -with-options". Obviously, this assumes you have some sort of printer spool queue set up, so you need the software to manage that. The traditional names are lp and lpr on Unix, and the software comes with the system. Since this is so obvious, there must be more to your question than meets the eye. Doing special formatting is tricky. There are a variety of ways that can be made to work. These days, one of the simpler ones is to generate an HTML file, read that into a browser, and have the browser do the printing. Alternatively, have the report generate some other markup language (eg troff -- done that, complete macro package from the ground up and all). -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"
On Thu, 10 Aug 2000 12:30:18 -0700, Jonathan Leffler <jleffler@informix.com> wrote: >fly wrote: >> i would like to know that whether is it possible to use a laser printer to >> print out a report that already writen using informix 4gl? >> if possible, how can i make it? >> does it need other softwares to help me to make it? >> if it does,what's the software that is suitable for it > >Yes. Send the report to the line printer spooler, either with REPORT TO >PRINTER or REPORT TO PIPE "printer-spooler-program -with-options". >Obviously, this assumes you have some sort of printer spool queue set >up, so you need the software to manage that. The traditional names are >lp and lpr on Unix, and the software comes with the system. > >Since this is so obvious, there must be more to your question than meets >the eye. > >Doing special formatting is tricky. There are a variety of ways that >can be made to work. These days, one of the simpler ones is to generate >an HTML file, read that into a browser, and have the browser do the >printing. Alternatively, have the report generate some other markup >language (eg troff -- done that, complete macro package from the ground >up and all). How can I make produce report file using I4GL that can be printed on matrix printer with continuous paper (8.5"x12") or laser printer with single sheet paper (8.5"x11")? For example: Make report that will start at new page for every customer, each row will have information about invoice number, invoice date and total invoice value, at the begining of every page will be customer number and name, at the end of every page will be total value for all invoices at that page and cumulative value for invoices for that customer. I dont't want to write two reports and user want to make choice of output device (matrix printer or laser)?
You would have to get a little more elaborate... Send the report to a File name (you must have a directory set up, a good naming convention and date/timestamp and a clean up routine to remove these files after they are 'so old') and then have the user select the report file and the printer and ... Or you can have the user answer a prompt / pop up window question before you create the report asking if report is to go to printer a or printer b and have a IF clause for your REPORT TO PRINTER... Many ways...just what is right for you??? Rob Vorbroker remove (_at_) to reply <mips_at_@zg.tel.hr> wrote in message news:l677ps00rojl6fa2ncc5ekoi8ov8prgo80@4ax.com... > On Thu, 10 Aug 2000 12:30:18 -0700, Jonathan Leffler <jleffler@informix.com> > wrote: > > >fly wrote: > >> i would like to know that whether is it possible to use a laser printer to > >> print out a report that already writen using informix 4gl? > >> if possible, how can i make it? > >> does it need other softwares to help me to make it? > >> if it does,what's the software that is suitable for it > > > >Yes. Send the report to the line printer spooler, either with REPORT TO > >PRINTER or REPORT TO PIPE "printer-spooler-program -with-options". > >Obviously, this assumes you have some sort of printer spool queue set > >up, so you need the software to manage that. The traditional names are > >lp and lpr on Unix, and the software comes with the system. > > > >Since this is so obvious, there must be more to your question than meets > >the eye. > > > >Doing special formatting is tricky. There are a variety of ways that > >can be made to work. These days, one of the simpler ones is to generate > >an HTML file, read that into a browser, and have the browser do the > >printing. Alternatively, have the report generate some other markup > >language (eg troff -- done that, complete macro package from the ground > >up and all). > > How can I make produce report file using I4GL that can be printed on matrix > printer with continuous paper (8.5"x12") or laser printer with single sheet > paper (8.5"x11")? > > For example: > Make report that will start at new page for every customer, each row will have > information about invoice number, invoice date and total invoice value, at the > begining of every page will be customer number and name, at the end of every > page will be total value for all invoices at that page and cumulative value for > invoices for that customer. > > I dont't want to write two reports and user want to make choice of output device > (matrix printer or laser)?
"remove (_at_) to reply" wrote: > Jonathan Leffler <jleffler@informix.com> wrote: > >fly wrote: > >> i would like to know that whether is it possible to use a laser printer to > >> print out a report that already writen using informix 4gl? > >> if possible, how can i make it? > >> does it need other softwares to help me to make it? > >> if it does,what's the software that is suitable for it > > > >Yes. Send the report to the line printer spooler, either with REPORT TO > >PRINTER or REPORT TO PIPE "printer-spooler-program -with-options". > >Obviously, this assumes you have some sort of printer spool queue set > >up, so you need the software to manage that. The traditional names are > >lp and lpr on Unix, and the software comes with the system. > > > >Since this is so obvious, there must be more to your question than meets > >the eye. > > > >Doing special formatting is tricky. There are a variety of ways that > >can be made to work. These days, one of the simpler ones is to generate > >an HTML file, read that into a browser, and have the browser do the > >printing. Alternatively, have the report generate some other markup > >language (eg troff -- done that, complete macro package from the ground > >up and all). > > How can I make produce report file using I4GL that can be printed on matrix > printer with continuous paper (8.5"x12") or laser printer with single sheet > paper (8.5"x11")? What parts of this are the critical differences for you? Do you want to configure the report to use the extra inch of output space, or would setting the TOP OF PAGE character be sufficient? Which version of I4GL do you have? If you have version 7.30, you can configure the size of the report at runtime with the new WITH clause: START REPORT repname TO PIPE cmd_string_var WITH PAGE LENGTH = intvar, ... You always could use a variable for the value of the command to pipe to, or for the name of the file. > For example: > Make report that will start at new page for every customer, each row will have > information about invoice number, invoice date and total invoice value, at the > begining of every page will be customer number and name, at the end of every > page will be total value for all invoices at that page and cumulative value for > invoices for that customer. Per-page totalling was something that I suggested ever so many moons ago, and never got implemented. You would have to handle that yourself, just as you do now. > I dont't want to write two reports and user want to make choice of output device > (matrix printer or laser)? No. And you don't have to. You can either use the 7.30 language features or use the code from the IIUG which botches together a workable system for configuring the shape of a report at runtime. -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"