Mr Harvey and Mr James
>
If you mean change the size of the font, then you would either have to modify the xbrowse source or create a subclass because the font size of xBrowse:report() is hardcoded.
...
If you want more control of the report then I suggest using TReport instead.
>
We can do with oBrw:Report( ... ) method itself, most of what we can do writing separate report using TReport. oBrw:Report( ... ) puts that flexibility in our hands through its bSetUp parameter.
There is no need to change the XBrowse code or subclass the method.
Syntax:
oBrw:Report( <cTitle>, ;
<lPreview>,;
<lModal>, ;
<bSetUp>, ; // xbrowse calls this codeblock for our setup
<aGroupBy> )
<aGroupBy> :
If we want a grouped report, we need not write separate report program.
Just giave an array of coulmns to be grouped on. This is very powerful feature.
Reduces a lot of our coding effort.
Now what is relevant for this subject is the bSetUp parameter
We can call oBrw:( ctitle, , , { |oRep,oBrw| MyReportSetup( oRep, oBrw ) } )
our function:
func MyReportSetUp( oRep, oBrw )
Here we have the report object that is created by the browse and the browse object. This function is called after creation of the browse object and before creation of the columns.
We can do any elaborate settings of the Report object here.
oRep:aFont already has two fonts built by the browse object
oRep:aFont[ 1 ] is Tahoma size 0,-8
oRep:aFont[ 2 ] is Tahoma size 0,-8 bold
we can substitute our own fonts or add fonts
We can or reset any properties of the report object.
Define our own columns if we want to.
Finally return control to the browse to continue printing.
return .t. if we do not want xBrowse to creat the columns.
return <.f. or nil> if we want xbrowse to create the columns
After xbrowse introduced this method, I practically stopped writing separate report modules.