RRWRUN directly to printer

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
JeffreyHunt
Posts: 4
Joined: Tue Oct 10, 2017 12:44 pm

RRWRUN directly to printer

Post by JeffreyHunt » Tue Mar 08, 2016 10:39 am

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

Chris_Strasser_(Guest)
Posts: 47
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: RRWRUN directly to printer

Post by Chris_Strasser_(Guest) » Thu Jun 09, 2016 2:39 pm

[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]__________

Post Reply