Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing in diferent Printers in a network enviroment
Message
From
02/03/1998 20:17:39
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00081509
Message ID:
00082199
Views:
46
The Following was Coded By Cert.
nFileCount = ADIR(frxFile,"*.frx")

 IF nFileCount = 0
    MessageBox("No .Frx File is found at "+CURDIR(),0+32,"What a Pity!")
    RETURN .F. && Why .f. - on purpose ? In case of extended program call
 ENDIF

 for iCount = 1 to nFileCount
     use frxFile[iCount,1]   && Dirinfo is two dimensional
     blank fields expr, tag, tag2         && Blank to remove printer driver info
     Wait "Cleaning "+ frxFile[iCount,1] Window NoWait

***     if "PLAN" $ frxFile[iCount,1]	&& Any Special Print need remain
***        * e.g. Plan.frx need Orientation=1 means Print in 'A'
***     	replace expr with "ORIENTATION=1"
***     endif

*     tableupdate(.f.)	&& Force to Flush, If Option has wrong set buffer
     use  && As Barbara pointed out always the first record
 ENDFOR

 MessageBox("All Bomber .Frx File(s) in "+CURDIR()+" have been Fixed!!",;
                 0+32,"Have A Nice Day!")
Just Copy it and save as a CLeanFrx.Prg file.
If some of report need 'Landscape' Printing, You need to add the middle
*** commented code to remain the 'Orientation=1'

Yesterday, I have made a Dummy project with a program looping one command
LOCAL I, PR

I = 1
PR = "NOTHING"
DO WHILE I > 0 AND !EMPTY(PR)
	I = ALLTRIM(STR(I))
	WAIT "The &I - (th) Times on GetPrinter!!" WINDOW NOWAIT
	I = VAL(I)
	PR = GETPRINTER()
	I = I + 1
ENDDO

QUIT
You also can create it!! Then, You can check whether it will be a Bomber
Printer Drive!!
Surely, HP printer got problem!! 32M Ram run this Dummy only can
get about 18 times and then memory leak!!

But even a old dot printer Do not have the limit!!
Although this, you still better to erase the printer info for each reports
so that you can move it to other system with different printer!!


>Try this:
>
>USE .FRX
>
>This opens to report table (report formatting/information/etc. are stored in a table).
>
>BROWSE
>
>In the first record, there will be information in the Expr, Tag, and Tag2 fields (they are memo fields). Delete this information.
>
>Now try the reports on different printers.
>
>Joe
>
>
>
>
>>>>whenever I print in diferent printers, the output is not aligned properly. What can I do to avoid this. One of the printers is an Epson LX-300, the other is a OKIDATA ML-321.
>>>>
>>>>Jim Booth told me to get rid of the prompt clause in the report form command and use sys(1037) instead but the result is the same.
>>>>
>>>>hope anybody can help me...
>>>
>>>Did you clean FRX file from printer definition?
>>
>>We have had a lot of problems with these types of issues, and haven't come up with a whole lot of solutions. What we eventually came up with was to write forms for dot matrix printers using native fonts for one printer (for example we use the Epson FX-100)
>>We then force the other printer to run in an Epson emulation mode. This seems to get stuff right (we are printing invoices on pre-printed forms, so they have to line up.)
>>The ML-321 will emulate Epson FXe (I have one right next to me) and MIGHT print the same under that emulation as the other printer. I say might because I beleive the LX is a 24 pin printer, and if it is we have found it less likely to print exactly the same as an Oki under FX emulation.
>>
>>This may not be the solution you are looking for, but for what it is worth, it has worked fairly well for us.
>>
>>by the way, by using a Native Printer font on the report you gain the added advantage that the printer prints much faster than if it has to try to render Windows fonts graphically.
>>
>>Good luck,
>>Paul Moon
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform