Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FPW26a Matrix printing on non-standard paper

Status
Not open for further replies.

ChrisMc

Programmer
Apr 24, 2002
43
GB
I'm converting a legacy app to Windows and part of the requirement is to print existing multi-part forms on a matrix printer. I'm using the Generic Text-only driver for both speed & compatibility.

The report designer needs a page layout and here's my problem: my forms are 4 inches by 10 3/8 inches (or 102mm by 265mm if you prefer) and there is no layout anywhere near. I thought I'd just assign standard fanfold and let it print, but when the print routine gets to (what it assumes is) the end of page, it skips a few lines (presumably skip over perforation). If I set the form to the nearest I can get (envelope size 10) it page ejects at the end of each form.

I've been experimenting -
SCAN NEXT 100
? <A Field>
ENDSCAN
again results in a page eject at just after the page length. I need to effectively print continuously and count lines for formatting OR find some way of entering a page length and width directly into the report.

Any ideas would be extremely welcome.

Thanks in advance
ChrisMc
 
Most often the &quot;skip over perforation&quot; is a hardware setting within the printer itself - often controlled by a DIP switch setting somewhere on the printer.

This can sometimes be turned off programatically using the specific printer's Programming Control Language (PCL)

As to output layout, you can continue to hardcode it using the ? & ?? method, or the @Row,Col method.
Or you can use Foxpro's Label Designer to create a new label to the needed dimensions.
Or, lastly, you can work with Foxpro's Report Designer and set the layout to Landscape orientation with a defined total number of lines per &quot;page&quot;. If you use this check to see that the layout's Eject Before Printing and Eject After Printing are set as you want.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Firstly, thanks for the interest.

You're right that skip over perf is a printer setting but it's not the case here - it's off. In the legacy (DOS) app, the printer is selected with SET PRINTER TO and the layout printed with ?/?? and/or @ Row,Col on the same printer I'm using for the development - no problem.

I can't use this method on a Windows program as it is a multi-user app and workstations would need CAPTURE commands to enable the printer commands to be vectored to the correct device - SET PRINTER TO LPT2 would be fine if it were a local printer but not with a network printer. I know I could use the alternative format of the command,\\MACHINE_NAME\PRINTER_NAME =, but I've then got to integrate that with the normal Windows method of selecting a printer - messy!

Good idea about the Label Designer but again it uses predefined layouts stored in Foxuser. Looking at the structure of the FRX and LBX files, for OBJTYPE = 1 fields HEIGHT and WIDTH should be the ones I want, but in a FRX file they hold 0 and -1 respectively. In a LBX file they seem to hold the label size - VPOS holds 3, HEIGHT 937 and WIDTH 25000 for a label defined as 3 x 7 on an A4 sheet - I presume 937 is the label height in what pixels??? I suppose I can eventually work out the convertion from mm to pixels by defining different sized labels and looking at the result.

It's your last point however which intrigues me - how do you define a total number of lines per page in the Report Designer? This would be the solution to my dilema but it's not a function I've ever seen. Can you help further with this?

Again, many thanks for the assistance.
Chris
 
First - Label Printing &quot;Label Designer uses predefined layouts stored in Foxuser&quot;

You can open an existing Label using MODIFY LABEL <some name> and then modify its layout - Rows, Width, Labels across, Labels down the page, etc. Re-Name it in Remarks and then, from the top menu Label | Layout - Save the new layout as your own new layout.

So you are not limited to ONLY the pre-defined Foxpro layouts.

Next - Report Designer - Changing page layout

Create a new report or modify an existing one with MODIFY REPORT <some name>. Go to the top menu Report | Page Layout
In here you set the Page Length and Page Width (a.k.a. Right Margin Column). In the Options screen accessed through that same parameter page you set the Page Eject Before Printing and Page Eject After Printing.

Just an FYI concerning - &quot;I can't use this method on a Windows program as it is a multi-user app and workstations would need CAPTURE commands to enable the printer commands to be vectored to the correct device - SET PRINTER TO LPT2 would be fine if it were a local printer but not with a network printer.&quot;

Actually you can use this method if it works for you. I have had to do it for some client legacy applications and it worked OK. You may have good reasons not to do so, but it will work by setting up different network printer queues each associated with a separate virtual LPT port and then allowing the user and/or the program to select which Printer causing the appropriate SET PRINTER TO LPTn.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Hi again; Sorry, don't know your first name so can't be as friendly as I would like<g>

You're using FP for DOS. My query is FP for Windows. The steps you describe only occur in FPD (although you CAN change the right margin of a label layout).

Having said that, I wonder how much detail I will lose if I transport to FPD, make the changes as you describe & then transport back??? I'll give it a go and see what transpires.

Thanks again,
Chris
 
Remove @ .. SAY commands from the program & use ? orr ?? instead as @ .. Say commands normally skip lines for perforation
 
My apologies for assuming that your &quot;legacy&quot; application was in FPD.

For the &quot;report&quot; layout....

In FPW you should still be able to use the LABEL approach.
Pick one of the &quot;standard&quot; labels. Then go into the top menu's Report | Page Layout and set to 1 column. Continue in that screen on to Print Setup and change to Landscape orientation.
Return to the main Label Designer screen and change the height of the Detail & Page Footer bands. Finally do a Save As... to retain your own label settings.
Then within your program do a LABEL FORM <name>... to utilize your new Label.

For the network printer access....

The previous comments still apply.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
I have done a lot of testing with this problem and these are the results, in the hope that it may assist anybody else also tearing their hair out.

You can define the layout of your report/label anyway you want, but if the paper size defined for the installed printer is different to that of the report/label, it wont work.

I naively thought that the paper size I had selected in the report/label layout would be passed to the printer driver but this is NOT the case. Example: my label layout is 4 inches deep. I define the paper used as German fanfold which is 12 inches long and therefore get 3 labels per page. Page preview shows a layout of 3 labels per page exactly as I want, but when printed it only works correctly if I also change the page size to German fanfold in the properties of the installed printer.

As I need both US standard fanfold for some reports and German standard fanfold for others I will have to have two printer driver installations – not the end of the world but an irritation.

Anybody not as naive as me is probably falling about laughing over this one, but there you go.

ChrisMc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top