Page 1 of 1
RRWRUN directly to printer
Posted: Tue Mar 08, 2016 10:39 am
by JeffreyHunt
I am running FoxPro and am looking to print my report directly to the printer, bypassing the screen popup. Is this possible, if so, how?____Thank you
=> RE: RRWRUN directly to printer
Posted: Thu Jun 09, 2016 2:39 pm
by Chris_Strasser_(Guest)
[updated:LAST EDITED ON Jun-09-16 AT 02:43 PM (EST) by ()]There are a couple different ways to handle this.____The easiest is to create a text file in Notepad of the form:______RI_REPORT=Your Report.RRW__RI_PRINTER=P__RI_WPTR=Your Printer__________The printer name should match exactly what you have in your Devices and Printers folder.____When you go to run RRWRUN.EXE, you^ll need to provide it with the appropriate command line:______RRWRUN /T<file name>____You might need to provide complete paths.____Alternatively, you can fill in the values of the Runtime input DBF in the same way and give the executable the record number of the report. Below is a code snippet from a program I wrote to handle this:____[code]__ SELECT rrwrunin__ APPEND BLANK __ replace ri_scope WITH "O", ri_loscope WITH cCode, ri_hiscope WITH cCode, ri_wptr WITH cPDFDriver__ replace ri_report WITH IIF(nDine = 0, fReportName, fReportNameDine), ri_outfile WITH cPrintFile, ri_copies WITH 1__ nPrintRec = RECNO()____ SELECT printctrl__ replace printid WITH cBatch, filedate WITH DATE(), filetime WITH TIME(), creator WITH SYS(0), repid WITH cRepID, u34 WITH cBkgTyp, procfilenm WITH cRunFile, u59 WITH cTripNumber__ replace destfilenm WITH cPrintFile, arcode WITH cCode, printpass WITH printpass 1, acctnum WITH cAcct, con WITH cCont, dineinfo WITH nDine, u37 WITH dTripDepart, batchdate WITH DATE(), batchtime WITH TIME()__ replace us10 WITH dLastChgDt, u36 WITH dBookDate, u101 WITH dNewFlyer, gencntrct WITH bContract, u67 WITH nAmt2Print____ IF FILE("f:
rw
runout.dbf" ) THEN __ thisform.runouttest__ cCmd = "f:
rw90
rwrun.exe f:
rw
rwrunin " + LTRIM(STR(nPrintRec, 6, 0))__ RUN /N &cCmd__ ELSE__ cCmd = "f:
rw90
rwrun.exe f:
rw
rwrunin " + LTRIM(STR(nPrintRec, 6, 0))__ RUN /N &cCmd __ ENDIF __[/code]__________