Discussion:
How to print
(too old to reply)
Isaac Joshua Chua
2015-01-26 00:04:06 UTC
Permalink
Hi guys! I would like to know how to print the exact file and in the exact printer in 4gl :)
Eric Vercelletto
2015-01-26 09:09:30 UTC
Permalink
Post by Isaac Joshua Chua
Hi guys! I would like to know how to print the exact file and in the exact printer in 4gl :)
Hi Isaac,

in native 4GL, use the REPORT functionality for printing. It is a a full REPORT WRITER functionality, including group by management and evolved functionality.
On unix platforms, the easiest way is to REPORT TO a file name (that can be a variable), and RUN an 'lp' based command with all its parameters, that you can build by a LET statement.

Please note that with x4GL languages such as Querix Lycia, the client can be on the Desktop (PC for instance) or a webclient, then you can use the client printers.

Does this help ?
Eric
Isaac Joshua Chua
2015-01-26 09:49:12 UTC
Permalink
Post by Eric Vercelletto
Post by Isaac Joshua Chua
Hi guys! I would like to know how to print the exact file and in the exact printer in 4gl :)
Hi Isaac,
in native 4GL, use the REPORT functionality for printing. It is a a full REPORT WRITER functionality, including group by management and evolved functionality.
On unix platforms, the easiest way is to REPORT TO a file name (that can be a variable), and RUN an 'lp' based command with all its parameters, that you can build by a LET statement.
Please note that with x4GL languages such as Querix Lycia, the client can be on the Desktop (PC for instance) or a webclient, then you can use the client printers.
Does this help ?
Eric
Hi Eric! thanks for that info, but I am using the REPORT function. I have a problem printing the file. We usually use a letter size paper but when I try to use a legal size, it prints like a letter size. Do you know how I can fix this?
Everett Mills
2015-01-26 14:25:50 UTC
Permalink
To account for going from letter to legal sized paper, you have to account for the longer page in your REPORT function. Look at the OUTPUT section and add (if it's not already there) PAGE LENGTH with a variable to hold 66 for letter sized paper or 84 for legal sized paper.

--EEM
-----Original Message-----
Sent: Monday, January 26, 2015 3:49 AM
Subject: Re: How to print
Post by Eric Vercelletto
Post by Isaac Joshua Chua
Hi guys! I would like to know how to print the exact file and in
the exact printer in 4gl :)
Post by Eric Vercelletto
Hi Isaac,
in native 4GL, use the REPORT functionality for printing. It is a a
full REPORT WRITER functionality, including group by management and
evolved functionality.
Post by Eric Vercelletto
On unix platforms, the easiest way is to REPORT TO a file name (that
can be a variable), and RUN an 'lp' based command with all its
parameters, that you can build by a LET statement.
Post by Eric Vercelletto
Please note that with x4GL languages such as Querix Lycia, the client
can be on the Desktop (PC for instance) or a webclient, then you can
use the client printers.
Post by Eric Vercelletto
Does this help ?
Eric
Hi Eric! thanks for that info, but I am using the REPORT function. I
have a problem printing the file. We usually use a letter size paper
but when I try to use a legal size, it prints like a letter size. Do
you know how I can fix this?
_______________________________________________
Informix-list mailing list
http://www.iiug.org/mailman/listinfo/informix-list
Isaac Joshua Chua
2015-01-26 23:58:51 UTC
Permalink
Thanks Everett! I might using 84 as the length. I have been using only 80 for that :)
Isaac Joshua Chua
2015-01-27 03:34:56 UTC
Permalink
Hi Everett! I tried the one you suggested and it is still the same. Do I need to do something with my lp?
Everett Mills
2015-01-27 14:11:26 UTC
Permalink
I don't think so. Unless you're running the printer at something other than six lines/inch.

--EEM
-----Original Message-----
Sent: Monday, January 26, 2015 9:35 PM
Subject: Re: How to print
Hi Everett! I tried the one you suggested and it is still the same. Do
I need to do something with my lp?
_______________________________________________
Informix-list mailing list
http://www.iiug.org/mailman/listinfo/informix-list
Isaac Joshua Chua
2015-01-27 23:54:14 UTC
Permalink
What is the normal number of lines per inches?
Eric Vercelletto
2015-01-28 08:20:26 UTC
Permalink
Post by Isaac Joshua Chua
What is the normal number of lines per inches?
Issac,


I have done this long time ago, but the best way I found to handle printers
was to create a table of printers, featuring all the basic and less basic escape sequences for each printer brand/type, for instance:
init_bold,end_bold,
init_italic,end_italic,
init_large,end_large,
init_small,end_small,
init_normal,end_normal, etc...

one you decide which printer you are going to use, load the escape sequences for this printer and assign them to variables with same names, then in your report
PRINT init_bold clipped,"This is the title",end_bold clipped
PRINT normal_clipped, my print stuff
PRINT more stuff
etc...

I think (my memory may betray me) that each printer has an escape sequence to initialize page length, so you can use this trick to initialize it the the size you want.

In addition, edit the printed file with vi or any editor, and check where (i.e. at wich line number) the '^L' or skip page characters are printed.
Skip page character is controlled by the OUTPUT section/page length value.

If you set 84 as PAGE LENGTH and your printer prints pages of 80, this will not work correctly, one skip page will be done at 80 (printer page length), and the 84th line skip page will never be done.

No sure about this, butyou could give a try.

To see the behaviour off what I say, you can also try to define a smaller PAGE LENGTH/OUTPUT SECTION value (say 60), and see how it behaves.

IHTH
Eric
Isaac Joshua Chua
2015-01-28 09:16:27 UTC
Permalink
Post by Eric Vercelletto
Post by Isaac Joshua Chua
What is the normal number of lines per inches?
Issac,
I have done this long time ago, but the best way I found to handle printers
init_bold,end_bold,
init_italic,end_italic,
init_large,end_large,
init_small,end_small,
init_normal,end_normal, etc...
one you decide which printer you are going to use, load the escape sequences for this printer and assign them to variables with same names, then in your report
PRINT init_bold clipped,"This is the title",end_bold clipped
PRINT normal_clipped, my print stuff
PRINT more stuff
etc...
I think (my memory may betray me) that each printer has an escape sequence to initialize page length, so you can use this trick to initialize it the the size you want.
In addition, edit the printed file with vi or any editor, and check where (i.e. at wich line number) the '^L' or skip page characters are printed.
Skip page character is controlled by the OUTPUT section/page length value.
If you set 84 as PAGE LENGTH and your printer prints pages of 80, this will not work correctly, one skip page will be done at 80 (printer page length), and the 84th line skip page will never be done.
No sure about this, butyou could give a try.
To see the behaviour off what I say, you can also try to define a smaller PAGE LENGTH/OUTPUT SECTION value (say 60), and see how it behaves.
IHTH
Eric
Hi Eric! I tried changing the page length and it still behaves like that. I tried it from 60-80 and it somewhat have the same results.

Regarding the usage of vi, we are trying to print it continuously. I use "cat" to fuse 2 output files. When I try to print it, it creates a gap. We want it to print continuously because we are printing in bulk. Also, the 1st output does not have a define length and it will be hard if we will remove "^L" every time and adjust the spaces between them.

Thanks for you info Eric :)
Ian Goddard
2015-01-28 09:37:14 UTC
Permalink
Post by Isaac Joshua Chua
What is the normal number of lines per inches?
It depends on your printer and its settings. 6 used to be the norm with
11" paper giving 66 lpp. However where metric paper sizes such as A4
are used lines per inch isn't a useful unit.
--
Ian

The Hotmail address is my spam-bin. Real mail address is iang
at austonley org uk
Loading...