Printing an oBrw array
Printing an oBrw array
I have a xBrowse display using an array. Works fine. Lost on how to figure out how to pint the array. Help please.
Thank you
Harvey
Harvey
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Printing an oBrw array
Harvey
this is a sample ,
Hth
Richard
this is a sample ,
Hth
Richard
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)
Re: Printing an oBrw array
Thanks for the quick response. Tried it but I get a bound array access. Here is the code maybe you can tell me what I'm doing wrong.
Code: Select all | Expand
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)
Thank you
Harvey
Harvey
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Printing an oBrw array
Harvey
i am refering to this in particular
DATA menucon3[nField],[01]
should be replaced with DATA menucon3[nField][01]
The comma in the data syntax will specify a second data value
Richard
i am refering to this in particular
DATA menucon3[nField],[01]
should be replaced with DATA menucon3[nField][01]
The comma in the data syntax will specify a second data value
Richard
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Printing an oBrw array
Harvey
there are several errors in your report definitions
i have made some changes and it compiles and run ok
the code is below
Richard
there are several errors in your report definitions
i have made some changes and it compiles and run ok
the code is below
Richard
Code: Select all | Expand
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)
- nageswaragunupudi
- Posts: 10709
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 6 times
- Contact:
Re: Printing an oBrw array
hag wrote:I have a xBrowse display using an array. Works fine. Lost on how to figure out how to pint the array. Help please.
If you are already browsing the array, the simplest way to print is to call
Code: Select all | Expand
oBrw:Report()
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India