Printing an oBrw array
Posted: Mon May 26, 2014 8:44 pm
I have a xBrowse display using an array. Works fine. Lost on how to figure out how to pint the array. Help please.
www.FiveTechSoft.com
https://fivetechsoft.com/forums/
REPORT oREPORT ;
......
COLUMN TITLE "Date Visite" ;
DATA TVISU[nField][02];
FONT 2 ;
GRID 2
COLUMN TITLE "Heure" ;
DATA TVISU[nField][03];
GRID 2
COLUMN TITLE "Ouvrier" ;
DATA TVISU[nField][06];
SIZE 20 ;
FONT 1 ;
GRID 1
END REPORT
oReport:bSkip := {|| nField++}
ACTIVATE REPORT oREPORT WHILE nField <= len(TVISU)
Code: Select all
static function printIt()
local oFont4
local oReport,oPen1, oPrn, oRep
local nVar := 1, nField := 1
local menucon3[3,03]
for i = 1 to 3
menucon3[i,1] := "hag1"
menucon3[i,2] := "hag2"
menucon3[i,3] := "hag3"
next i
if nVar == 1
DEFINE FONT oFont4 NAME "Arial narrow" SIZE 0,-5.85 BOLD //of oRep:oDevice
else
DEFINE FONT oFont4 NAME "Arial narrow" SIZE 0,-6.25 BOLD //of oRep:oDevice
endif
define pen oPen1 width 1
PRINT oPrn NAME "Profit and Loss"
prnlandscape()
ENDPRINT
REPORT oReport ;
TITLE rtrim(mcompname);
FONT oFont4,oFont4;
PEN oPen1 ;
HEADER "date";
LEFT ;
FOOTER OemtoAnsi("Footer");
CENTERED ;
PREVIEW ;
CAPTION "Previewing Profit & Loss"
oReport:nTitleUpLine := RPT_NOLINE
oReport:aFont[1] := oFont4
COLUMN TITLE "No." ;
DATA menucon3[nField],[01];
FONT oFont4 ;
GRID
COLUMN TITLE "Name" ;
DATA menucon3[nField],[02];
FONT oFont4 ;
GRID
COLUMN TITLE "Total" ;
DATA menucon3[nField],[03];
SIZE 20 ;
FONT oFont4 ;
GRID
END REPORT
oReport:bSkip := {|| nField++}
ACTIVATE REPORT oReport WHILE nField <= len(menucon3)
Code: Select all
menucon3 := {}
AADD(MENUCON3,{"hag1",1,100})
AADD(MENUCON3,{"hag2",2,200})
AADD(MENUCON3,{"hag3",3,300})
DEFINE FONT oFont4 NAME "Arial narrow" SIZE 0,-5.85 BOLD //of oRep:oDevice
define pen oPen1 width 1
REPORT oReport ;
TITLE "This is a test";
FONT oFont4 ;
PEN oPen1 ;
HEADER "date";
LEFT ;
FOOTER OemtoAnsi("Footer");
CENTERED ;
PREVIEW ;
CAPTION "Previewing Profit & Loss"
COLUMN TITLE "Name" ;
DATA menucon3[nField][02];
FONT 1 ;
GRID 1
COLUMN TITLE "No." ;
DATA menucon3[nField][01];
FONT 1 ;
GRID 1
COLUMN TITLE "Total" ;
DATA menucon3[nField][03];
SIZE 20 ;
FONT 1 ;
GRID 1
END REPORT
oReport:bSkip := {|| nField++}
ACTIVATE REPORT oReport WHILE nField <= len(menucon3)
If you are already browsing the array, the simplest way to print is to callhag wrote:I have a xBrowse display using an array. Works fine. Lost on how to figure out how to pint the array. Help please.
Code: Select all
oBrw:Report()