Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #12145

Re: ReportPro how to cut the page afert the summary band

From Franz Rachbauer <office@rachbauer.org>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: ReportPro how to cut the page afert the summary band
Date 2018-12-04 12:08 +0100
Organization Aioe.org NNTP Server
Message-ID <pu5n6n$1107$1@gioia.aioe.org> (permalink)
References <6808af5b-f05f-468d-a0ed-3d249739f492@googlegroups.com>

Show all headers | View raw


Hi,
send cut page code (chr(29+"V0") directly to printer from vo after 
report. Some years ago I found this function to do this (I use it to 
open cash drawer):

==================== Code =====================
FUNCTION WriteData2Printer (cPrinter AS STRING, cData AS STRING) AS 
LOGIC PASCAL
LOCAL lResult    AS LOGIC
LOCAL hPrinter   AS PTR
LOCAL pszPrinter AS PSZ
LOCAL pBuffer    AS PTR
LOCAL dwWritten  AS DWORD
LOCAL pDocInfo   IS _winDoc_Info_1
LOCAL pPtrDflts  IS _WINPRINTER_DEFAULTS

lResult := FALSE
pszPrinter := StringAlloc(cPrinter + _CHR(0))
IF OpenPrinter(pszPrinter, @hPrinter, @pPtrDflts )  // NULL
	pBuffer := StringAlloc(cData + _CHR(0))
	pDocInfo.pDocName    := String2Psz("PrinterSpooler Document")
	pDocInfo.pOutPutFile := NULL_PSZ       // String2Psz (NULL_STRING)
	pDocInfo.pDatatype   := String2Psz ("RAW")
	IF StartDocPrinter(hPrinter, 1, @pDocInfo) <> 0
		IF WritePrinter(hPrinter, pBuffer, SLen(cData), @dwWritten)
			IF dwWritten == SLen(cData)
				lResult := TRUE
			ENDIF
		ELSE
			dwWritten := GetLastError()
		ENDIF
		EndDocPrinter(hPrinter)
	ELSE
		dwWritten := GetLastError()
	ENDIF
	ClosePrinter(hPrinter)
	MemFree(pBuffer)
ELSE
	dwWritten := GetLastError()
ENDIF
MemFree(pszPrinter)

RETURN lResult
========================= End Code =================

Maybe it does, if you make a field at summary page which has cut code.

Franz

Am 16.11.2018 um 17:21 schrieb Jean-Luc Stassen:
> Hi there,
> 
> Does anyone already find a solution to cut a page after the summary band?
> 
> I want to print a receipt on an epson ticket printer.
> 
> I have tried to send a force page eject on the summary band, but it doesn't work
> 
> any idea ?
> 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

ReportPro how to cut the page afert the summary band Jean-Luc Stassen <jls@igsoft.be> - 2018-11-16 08:21 -0800
  Re: ReportPro how to cut the page afert the summary band Martin <Martin@spam.spam> - 2018-12-03 15:26 +0000
  Re: ReportPro how to cut the page afert the summary band Franz Rachbauer <office@rachbauer.org> - 2018-12-04 12:08 +0100

csiph-web