FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour adding graphics to printing
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
adding graphics to printing
Posted: Sat Feb 27, 2010 10:31 PM

I'm Printing a xbrowse I'd like to add some graphics to the header and even columns headings.

Thank you

Harvey
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: adding graphics to printing
Posted: Sun Feb 28, 2010 02:02 AM
We can customize the report object created by xbrowse, in a codeblock provided in the 4th parameter of oBrw:Report( cTitle, lPreview, lModal, bSetUp, aGroupBy ) method.
Code (fw): Select all Collapse
oBrw:Report( , , , { | oRep, oBrw, nCall| MyRepSetup( oRep, oBrw, nCall } )

*...
*...

static function MyRepSetUp( oRep, oBrw, nCall )

   if nCall == 1  // called by xbrowse after oRep created but before creation of columns
      return 2 // ask xbrowse to call second time after creation of columns
   endif
   // this call is after creation of columns
   // here we extend oRep and oRep:Columns array 
   // with any additonal features we want

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: adding graphics to printing
Posted: Sun Feb 28, 2010 02:42 AM

Thanks for the quick response. I don't use oBrw:report() i use oPrn, oReport.

Thank you

Harvey
Posts: 46
Joined: Fri Mar 09, 2007 01:31 PM
Re: adding graphics to printing
Posted: Sun Feb 28, 2010 10:51 AM

Hi Hag,

Could you see /fwh/samples/report directory in FWH? I think that you find this funcion (SayBitmap) in some samples prg.

Good luck.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: adding graphics to printing
Posted: Sun Feb 28, 2010 10:51 AM

Then, we need to use oRep:SayBitmap( nRow, nCol, cBitmap, nWidth, nHeight, nScale, nAlphaLevel )

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion