if msgYesNo("oReport?")
oBrw:report( "Guess who", , , { |oRep,oBrw| MyReportSetup( oRep, oBrw,msize ) } )
return nil
endif
func MyReportSetUp(oRep,oBrw)
oRep:aFont[1]
return nil
oRep:aFont[1]
#include 'fivewin.ch'
#include 'xbrowse.ch'
#include 'report.ch'
REQUEST DBFCDX
function Main()
local oWnd, oBrw, oBar, oPrnFont
USE CUSTOMER NEW ALIAS CUST SHARED VIA 'DBFCDX'
DEFINE WINDOW oWnd
@ 0,0 XBROWSE oBrw OF oWnd
oBrw:CreateFromCode()
oWnd:oClient := oBrw
DEFINE BUTTONBAR oBar OF oWnd SIZE 80,32 2007
DEFINE BUTTON OF oBar PROMPT 'Print' ;
ACTION oBrw:Report( 'TestReport', , , ;
{ |oRep, oBrw, oFont| MySetUp( oRep, oBrw, @oPrnFont ) } )
ACTIVATE WINDOW oWnd
RELEASE FONT oPrnFont
return nil
static function MySetUp( oRep, oBrw, oFont )
DEFINE FONT oFont NAME 'ARIAL NARROW' SIZE 0,-9 OF oRep:oDevice
oRep:aFont[ 1 ] := oFont
COLUMN DATA CUST->First,CUST->Last,'' ;
TITLE 'Name','','' SIZE 20
COLUMN DATA CUST->STREET,CUST->ZIP ;
TITLE 'Address','' SIZE 30
COLUMN DATA CUST->City,CUST->State,'' ;
TITLE 'City','State','' SIZE 20
COLUMN DATA CUST->HIREDATE, ;
If( CUST->Married, 'Married','Single' ) ;
TITLE 'HireDate','Status' ;
SIZE 10
COLUMN DATA CUST->Salary, CUST->Age ;
PICTURE '999,999,999' ;
TOTAL ;
TITLE 'Salary','Age'
return .t.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 68 guests