FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Mr Rao, How insert image using oBrw:Report ? (Solved)
Posts: 400
Joined: Tue Oct 16, 2007 05:51 PM
Mr Rao, How insert image using oBrw:Report ? (Solved)
Posted: Mon Aug 07, 2017 12:47 PM
Good day,

I need to include an image in a report using xbrowse. I am using this code :

Code (fw): Select all Collapse
bSetup := {|oRep| oRep:saybitmap(,, "c:\sistema\logo.bmp")

REDEFINE XBROWSE oBrw ID 100 OF oDlg;
    DATASOURCE oQry;
    ...

oBrw:Report("Report xbrowse with image",,, bSetup)


But it does not work
Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
Posts: 400
Joined: Tue Oct 16, 2007 05:51 PM
Re: Mr Rao, How insert image using oBrw:Report ?
Posted: Mon Aug 14, 2017 04:27 PM
The following code works.

Code (fw): Select all Collapse
 bImage := {|oRep| oRep:SayBitmap(0.1, 0.1, "c:\images\logo.bmp")}
 bStart := {|oRep| oRep:bStartPage := bImage}
    
 oBrw:Report("Reporte xbrowse con imagen en titulo",,, bStart)
Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Mr Rao, How insert image using oBrw:Report ? (Solved)
Posted: Wed Aug 16, 2017 09:35 AM
Albeiro,

thank You, works fine.
I tested and added the solution as a new button to my sample-collector
a Logo added to the report





TO EXCEL

@ 250, 25 BTNBMP oBtn1 OF oFld1:aDialogs[1] ;
SIZE 80, 15 PIXEL 2007 ;
NOBORDER ;
PROMPT " &oBrw1:ToExcel() " ;
FILENAME c_Path1 + "EXCEL1.bmp" ;
ACTION ( oBrw1:ToExcel(), ;
TOP_CLOSE(1, "Excel" ) ) ;
FONT oSFont ;
LEFT
oBtn1:cToolTip = { "Excel","EXPORT", 1, CLR_BLACK, 14089979 }
oBtn1:SetColor( 0, )


REPORT ( with logo )

@ 250, 110 BTNBMP oBtn2 OF oFld1:aDialogs[1] ;
SIZE 80, 15 PIXEL 2007 ;
NOBORDER ;
PROMPT " &oBrw1:Report() " ;
FILENAME c_Path1 + "REPORT.bmp" ;
ACTION ( bImage := {|oRep| oRep:SayBitmap(0.2, 7, c_Path1 + "Customer.bmp")}, ;
bStart := {|oRep| oRep:bStartPage := bImage}, ;
oBrw1:Report("Xbrowse report with image",,, bStart) ) ;
FONT oSFont ;
LEFT
oBtn2:cToolTip = { "Report","EXPORT", 1, CLR_BLACK, 14089979 }
oBtn2:SetColor( 0, )


regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 400
Joined: Tue Oct 16, 2007 05:51 PM
Re: Mr Rao, How insert image using oBrw:Report ? (Solved)
Posted: Wed Aug 16, 2017 02:28 PM

Uwe,

Very good example

:D

Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com

Continue the discussion