General information
Category:
Reports & Report designer
I read the page
Could you please help me ?
I am sending my report to myprint.txt file
Could you tell me if is it easy to insert myprint.txt
in the sample code below ?
*!* Example usage:
*!* SET PROC TO DIRPRTCLASS.PRG ADDITIVE
*!* * Note - CLSHeap.PRG needs to be in your SET PROC list, or part of your project
*!* oDirPrt = CREATEOBJ('DirectPrintOutput')
*!* WITH oDirPrt
*!* .PrinterOpen('LPT1:') && Arg can be a Win Printer name, port, or a print queue - works with both MSNetwork
*!* && and NetWare queues. It also works with CAPTUREd or NET USEd printer ports
*!* IF .PrinterIsOpen()
*!* .DocOpen('MySpoolJob')
*!* .DocWrite('This is sample text that prints after the first close' + CHR(13) + CHR(10) + CHR(9) + 'and this next line is indented one tab stop')
*!* .DocWrite(' this continues the line')
*!* .DocWrite(CHR(12)+'And this form feeds')
*!* .DocWrite(' without a Windows page mark')
*!* .SpoolFile('MyFileToDeleteAfterItPrints.TMP', .T.) && Spool file and delete after printed
*!* && the spooled file prints first because the first document you're working is still open
*!* .DocWrite(CHR(13) + CHR(10) + CHR(10) + 'this is still written to the first spool job' + CHR(13) + CHR(10))
*!* .DocWrite('*** still the same print document ***' + CHR(13)) && this line will get overwritten since CR w/o LF
*!* .DocWrite(CHR(9) + 'You can embed any control sequence' + CHR(10) + CHR(10))
*!* .DocClose()
*!* .SpoolFile('AnotherFileToPrinterWithoutDeleting')
*!* .DocOpen() && assign a random job name
*!* .DocWrite('<*** and note that the next print job picks up right where you left off')
*!* .PrinterClose() && close both current job and the printer
*!* ENDIF
*!* ENDWITH
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only