Mr Rao, How insert image using oBrw:Report ? (Solved)

Mr Rao, How insert image using oBrw:Report ? (Solved)

Postby albeiroval » 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: Select all  Expand view

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
User avatar
albeiroval
 
Posts: 358
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

Re: Mr Rao, How insert image using oBrw:Report ?

Postby albeiroval » Mon Aug 14, 2017 4:27 pm

The following code works.

Code: Select all  Expand view

 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
User avatar
albeiroval
 
Posts: 358
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

Re: Mr Rao, How insert image using oBrw:Report ? (Solved)

Postby ukoenig » Wed Aug 16, 2017 9: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

Image

Image

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 :D
Last edited by ukoenig on Thu Aug 17, 2017 8:56 am, edited 4 times in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Mr Rao, How insert image using oBrw:Report ? (Solved)

Postby albeiroval » Wed Aug 16, 2017 2:28 pm

Uwe,

Very good example

:D
Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
User avatar
albeiroval
 
Posts: 358
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 19 guests