No programa
1- crio a fun��o picTo Report - Esta fun��o existe no Sample do Centura
!!CB!! 134
Function: PicToReport
Description: Accept a filename, report window handle and
report object variable name
and set that report object variable to the
picture (a BMP) in the filename file.
Returns
Boolean:
Parameters
Window Handle: hWndRep
String: sFileName
String: sVariableName
Static Variables
Local variables
Long String: sPicture
Number: nPicLength
File Handle: fhPictureFile
Boolean: bRet
Actions
!
! This function opens the file with the desired picture
and reads the picture into a string, then passes that
to the passed report variable.
!
Call SalFileOpen(fhPictureFile, sFileName, OF_Read)
Set nPicLength = SalFileRead(fhPictureFile, sPicture, 500000)
Call SalFileClose(fhPictureFile)
!
Set bRet = SalReportSetObjectVar( hWndRep, sVariableName, sPicture)
Return bRet
2- On SAM_ReportFetchInit - uso aqu� por se tratar do lotipo da empresa. Se for imagem do empregado por exemplo, posso usar no On SAM_ReportFetchNext
! inserir o logotipo
Set hWndReport = hWndNULL
Set hWndReport = SalNumberToWindowHandle(wParam)
Call PicToReport(hWndReport, 'Logoemp.bmp', 'Symbol')
!
A imag�m � Logoemp.bmp e uso na pasta onde o programa deve iniciar no meu caso � Centura. Vc pode usar uma vari�vel com o nome da imagem � ser transportada para o relat�rio basta para tal fazer uma atribui��o direita ou com um select, guardar o resultado em uma vari�vel (nome_da_imagem) antes de chamar a fun��o
"Call PicToReport(hWndReport, 'Logoemp.bmp', 'Symbol')"
Neste caso a �ltima linha seria:
Call PicToReport(hWndReport, nome_da_imagem, 'Symbol')
Espero q isso tb te ajude
MSN Messenger: converse com os seus amigos online. Instale gr�tis. Clique aqui. ============================================== Lista de Centura SQLWindows Administrador : [EMAIL PROTECTED] [ http://www.centuraexplorer.com ] Para sair desta lista mande mensagem para: [EMAIL PROTECTED] sem nada no Subject e com o comando a seguir no corpo da msg: "unsubscribe sqlwin" (sem as aspas) ==============================================
