Re: Selecting printer in ACE reports using prompt
Posted in 1995
In article <DGnzIH.8xr@cix.compulink.co.uk> onlinedbc@cix.compulink.co.uk ("Malcolm Weallans") writes: >Kate writes:- >> I have a number of reports that I'd like the user to be able to send > >either to a local or network printer. Is there any way I can get the >> user to be able to input the printer name? I see this as a proble, >> because of the different syntax for local , cf. system printers. >> > --Kate >> > > Kate, you have stumbled on one of the biggest deficiencies of the >INFORMIX report writers. A report, whether in SQL or 4GL, can only be >output to one printer. If you want to change the name of the printer yo >can do this by changing the DBPRINT environment variable before running >each report, BUT ONLY IF THE PRINTERS HAVE THE SAME PHYSICAL >CHARACTERISTICS. By that I mean that they have the same number of lines >per page, the same number of characters per line, and, if you use any >PRINT ASCII statements to select BOLD, underline, or font, that both >printers recognise the same sequences, which normally means that they are >the same make and model. The way that I get round the problem is to >produce the information I need to report into a file and then output it >to printer using a modern mail-merge program. If you're only outputting ASCII (no bold etc) the easiest way to do this is just to hold a database table of output device characteristics (eg lp -s) and pop up a window with a pick list, allow the user to select the destination then use OUTPUT REPORT FRED TO PIPE some_place This allows you to use pg, more etc as well as any other valid pipe, including email programs. Peter Wiley