Re: Barcodes in Informix Reports
Posted in 1994
Topics: General Discussion
In <1994Jun30.091140.8898@gsesco.DIALix.oz.au> greg@gsesco.DIALix.oz.au (Greg Wake) writes: >I know this is a popular question but until recently I have not >had the need to ask this question. >How can you insert barcodes into an Informix report?? >I would like to be able to place them anywhere in the report >but preferably, for example, at the beginning of each row of data. >ie <barcode> <data_field1> <data_field2> >The use of a printer that supports a barcode "font" is an option >in which case my next question is how do you send printer specific >commands from within an Informix Report??? ie turn barcode font on/off >Any help would be greatly appreciated. Greg, I have just finished an ACE report that (hopefully 8-) ) does just this! I am using Informix for DOS 4.10SE. I started with a 3rd party software package called Label Works from Intermec who makes our label printers. I used labelworks to design the label formats I would need then printed an example to a print file which is just an ascii dump of the printer codes and text sent through a com port. These files have control codes only at the beginning and end of each set of instructions defining a "label". I used this as a template to construct my ace output with the necessary fields and text inserted between the control codes. Label works even allows me to include graphics (logos etc) where space permits. I used the bare bones of the print files from my designs in Labelworks as format files, one for each type of label I designed. I then allow the user to select the format required. The code reads the stub from the user selected format file adds the info from the select and prints to a file. I will add a line to the batch file that executes the ACE code to dump the file to the com port. The important part of the code uses the "acsii" key word to insert control characters into the output. Eg from my code: for i = 1 to count do begin print acsii 31, num_labels clipped, ";" print get_array(1,1), id clipped, ";" print get_array(1,2), lname clipped, ";" print get_array(1,3), batch, clipped, ";", ascii 17, ";" end You could substitute variables for the get_array() functions that have been assigned the strings of control codes to precede the variable text in each label (either hard coded control codes or read from a file). I should mention that the application we are using with the ACE reports was delivered with a large library of C functions that make file IO a breeze. If you are interested I can send my ACE code. Let me know. Regards, Stu -- ______________________________________________________________________ _ / \\._ _|_ _.._ o _ Stu Miller - Data Management Tech \\_/| | |_(_|| |(_) internet: millers@ndm.gov.on.ca ____ _____ ___ e-mail: miller_s@torv05.ndm.gov.on.ca / ___| ____/ _ \\ voice: (705)670-5635 FAX:(705)670-3047 | | _| _|| | | | _ | |_| | |__| |_| | _ _ ._ o _ _ _ / _ ._ _|_ ._ _ \\____|_____\\___/ _>(/_| \\/ |(_(/__> \\_(/_| | |_ | (/_ Geoscience Laboratories Ministry of Northern Development & Mines 933 Ramsey Lake Road, Sudbury, Ontario, CANADA P3P 1G9 -----------------------------------------------------------------------