Hi guys:
How can I have a report that print a JPG in one of its columns along other text data ? Thank you for your help.
#include "FiveWin.Ch"
#include "ord.ch"
#include "xbrowse.ch"
#include "report.ch"
REQUEST DBFCDX
//------------------------------------------------------------------//
function Main()
local oPrn, oRep, oFont, oBold
USE WWONDERS NEW ALIAS WW SHARED VIA 'DBFCDX'
SET FILTER TO RECNO() > 7
GO TOP
DEFINE FONT oFont NAME 'TAHOMA' SIZE 0,-9
DEFINE FONT oBold NAME 'VERDANA' SIZE 0,-10 BOLD
PRINT oPrn NAME 'Inline images in FW Report' PREVIEW MODAL
REPORT oRep TITLE 'FWin Report inline Images' ;
FONT oFont, oBold PREVIEW TO DEVICE oPrn
COLUMN TITLE 'Name' DATA WW->NAME SIZE 30
// COLUMN TITLE 'Details' DATA WW->Details MEMO
COLUMN TITLE 'Image' DATA WW->Details MEMO SIZE 35 ;
FONT 2 CENTER ;
IMAGE IMGDATA WW->Image HEIGHT 20 ALPHALEVEL 128
ENDREPORT
ACTIVATE REPORT oRep
ENDPRINT
RELEASE FONT oFont
RELEASE FONT oBold
CLOSE WW
return ( 0 )
//------------------------------------------------------------------//
#include "FiveWin.Ch"
#include "xbrowse.ch"
#include "report.ch"
#define IMGPATH "c:\fwh\bitmaps\AlphaBmp\"
//------------------------------------------------------------------//
function Main()
local oPrn, oRep, oFont, oBold, n
local aDir := DIRECTORY( IMGPATH + "*.bmp" )
n := 1
DEFINE FONT oFont NAME 'TAHOMA' SIZE 0,-9
DEFINE FONT oBold NAME 'VERDANA' SIZE 0,-10 BOLD
PRINT oPrn NAME 'Inline images in FW Report' PREVIEW MODAL
REPORT oRep TITLE 'FWin Report inline Images' ;
FONT oFont, oBold PREVIEW TO DEVICE oPrn
COLUMN TITLE 'Name' DATA aDir[ n, 1 ] SIZE 30
COLUMN TITLE 'Image' ;
DATA IMGPATH + CRLF + aDir[ n, 1] + CRLF + ;
DToC( aDir[ n, 3 ] ) + CRLF + aDir[ n, 4 ] ;
SIZE 35 MEMO FONT 2 CENTER ;
IMAGE IMGDATA IMGPATH + aDir[ n, 1 ] ;
HEIGHT 5 ALPHALEVEL 180
ENDREPORT
oRep:bSkip := { || n++ }
ACTIVATE REPORT oRep WHILE n <= Len( aDir )
ENDPRINT
RELEASE FONT oFont
RELEASE FONT oBold
return ( 0 )
//------------------------------------------------------------------//
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 58 guests