We have an application where all the ECR items registered appear on a screen. The waiter can prepare the items and then print a coupon.
- Code: Select all Expand view RUN
DIALOG or WINDOW
insert xbrowse
call function
@ 0,0 ;
BUTTON "Druck" ;
ACTION druck_bon( cTischNr, oBrw ) ;
OF oDlg
function druck_bon( cTischNr, oBrw )
local oVRD
local lPreview := .f.
local cDruckerName := GetPvProfString( "SETUP", "Drucker", "FinePrint", ".\ini\thekenmeister.ini")
local I := 0
local uBm
local lContinue := .t.
*----------------------------------------------------------
EASYREPORT oVRD NAME ".\xVrd\ThekenBon.vrd" PREVIEW lPreview TO cDruckerName PRINTDIALOG IIF( lPreview, .F., .F. )
PRINTAREA 1 OF oVRD ;
ITEMIDS {106 };
ITEMVALUES { cTischNr }
uBm := oBrw:BookMark
Eval( oBrw:bGoTop )
do while lContinue
PRINTAREA 2 OF oVRD;
ITEMIDS { 101, 102};
ITEMVALUES { ( oBrw:aCols[ 1 ]:Value ), oBrw:aCols[ 2 ]:Value }
lContinue := ( Eval( oBrw:bSkip, 1 ) == 1 )
enddo
oBrw:BookMark := uBm
oBrw:Refresh()
oVRD:End()
return nil
//----------------------------------------------------------------------------//
- Code: Select all Expand view RUN
VRD files created with the REPORT DESIGNER:
Printarea 1
[General]
Title=BonKopf
Width=75
Height=20
Top1=5
Top2=1
TopVariable=0
Condition=1
DelEmptySpace=0
BreakBefore=0
BreakAfter=0
[Items]
10=Text|Bon|101| 0|1|1|1|1|45|6|2|3|2|1|0|0||0
11=Text|Date|102| 0|1|1|9|42|32|5|7|3|2|1|0|0||0
401=LineHorizontal|Line horizontal|-1|1|1|1|16|0|73|1|3|2|1|1|0|0|0||||||||||
Printarea 2
[General]
Title=Order positions
Width=70
Height=7
Top1=0
Top2=0
TopVariable=1
Condition=1
DelEmptySpace=0
BreakBefore=0
BreakAfter=0
PrintBeforeBreak=0
PrintAfterBreak=0
ControlDBF=none
Formula1=
Formula2=
Formula3=
Formula4=
Formula5=
Formula6=
Formula7=
Formula8=
Formula9=
Formula10=
Formula11=
Formula12=
[Items]
1=TEXT|Menge|101|1|1|1|0|0|8|6|13|3|2|1|0|0||0||||||||||||
2=TEXT|Bezeichnung|102|1|1|1|0|13|54|6|10|3|2|1|0|0||0||||||||||||
5=TEXT|Preis|105|0|0|1|0|40|11|6|3|3|2|3|0|0||0||||||||||||
6=TEXT|Wert|106| 0|1|1|0|51|18|6|13|3|2|3|0|0||0||||||||||||
Here you see the EasyReport designer. We Change Font and insert a line - all in runtime!!!
Best regards,
Otto