Page 1 of 1

adding graphics to printing

Posted: Sat Feb 27, 2010 10:31 pm
by hag
I'm Printing a xbrowse I'd like to add some graphics to the header and even columns headings.

Re: adding graphics to printing

Posted: Sun Feb 28, 2010 2:02 am
by nageswaragunupudi
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: Select all

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
 

Re: adding graphics to printing

Posted: Sun Feb 28, 2010 2:42 am
by hag
Thanks for the quick response. I don't use oBrw:report() i use oPrn, oReport.

Re: adding graphics to printing

Posted: Sun Feb 28, 2010 10:51 am
by alfonso
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.

Re: adding graphics to printing

Posted: Sun Feb 28, 2010 10:51 am
by nageswaragunupudi
Then, we need to use oRep:SayBitmap( nRow, nCol, cBitmap, nWidth, nHeight, nScale, nAlphaLevel )