FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBROWSE oBrw:Report() FONT & PAGES
Posts: 301
Joined: Fri Jun 01, 2007 09:07 AM
XBROWSE oBrw:Report() FONT & PAGES
Posted: Wed Apr 04, 2012 07:03 AM

Hi,
How to define font for oBrw:Report() form XBROWSE and to print pages of footer
Best regards,

Posts: 301
Joined: Fri Jun 01, 2007 09:07 AM
Re: XBROWSE oBrw:Report() FONT & PAGES
Posted: Thu Apr 05, 2012 06:41 AM

XBROWSE is so complex class and need support ... so i please again
Best regards,

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE oBrw:Report() FONT & PAGES
Posted: Fri Apr 06, 2012 03:21 PM
Please see the parameters of Report method
Code (fw): Select all Collapse
METHOD Report( cTitle, lPreview, lModal, bSetUp, aGroupBy )

You may specify a codeblock as the 4th parameter to further enhance the report.

Example:
Code (fw): Select all Collapse
oBrw:Report( nil, nil, nil, { |oReport, oBrowse, nIter| MySetup( oReport, oBrowse, nIter ) } )

You may specify any datas to the oReport in your MySetup(...) function.

Please note:
This codeblock is first evaluated after creating the report object but before the column objects are created. At that time nIter is 1. Please note at this time the column objects are not yet created.

We may specify any data of report object in this call.

If the codeblock returns numeric value 2, the codeblock is evaluated again after creation of all the columns.

We may specify any data of report or column objects during the second call if desired.

With the help of the codeblock we can fully customize the report to our requirements.
Regards



G. N. Rao.

Hyderabad, India
Posts: 301
Joined: Fri Jun 01, 2007 09:07 AM
Re: XBROWSE oBrw:Report() FONT & PAGES
Posted: Sat Apr 07, 2012 09:41 AM

Thanks fo reply,
A small sample please ... this is a function from samples testxbr3.prg
How codeblock and function need to look like to can define a font and print pages on footer
Best regards,

//----------------------------------------------------------------------------//

static function ReportMenu( oBrw )

local oPop

MENU oPop POPUP 2007
MENUITEM "Simple Report" ACTION oBrw:Report()
MENUITEM "Report with Grouping" ;
WHEN ! Empty( oBrw:GetVisibleCols()[1]:cOrder ) ;
ACTION oBrw:Report( nil, .t., .t., nil, 1 )
ENDMENU

return oPop

//----------------------------------------------------------------------------//

Continue the discussion