Supongo que como dice Alberto funciona igual para los rpt.
Yo lo hago así (y también uso rpt):
Public Pic1 As CRAXDRT.OLEObject 'Dim an object for the ole pictures so we can
change the pic
Public m_Report As CRAXDRT.Report ' The report to be
embedded in the viewer
Dim crxApplication As New CRAXDRT.Application
Dim WithEvents CrSecPH As CRAXDRT.Section 'dim them with events so we can
access the format event
Dim g_UbicacionLogo As String
Private Sub Form_Load()
g_UbicacionLogo=App.Path & "\tulogo.bmp"
Set CrSecPH = m_Report.Sections("PH") ' set this section object to the
page header
For i = 1 To CrSecPH.ReportObjects.Count 'Loop through the report
objects and see if they are pictures
If CrSecPH.ReportObjects(i).Kind = 6 Then ' if it is a CrOleObject then
Set Pic1 = CrSecPH.ReportObjects(i) 'Set the pic1 object to the
Ole Report object
End If
Next i
End Sub
Private Sub CrSecPH_Format(ByVal pFormattingInfo As Object)
Set Pic1.FormattedPicture = LoadPicture(g_UbicacionLogo) 'changes the pic
in the Page Header
End Sub
También podés insertar imágenes en cualquier otra parte del reporte además del
pageheader ejecutando los formats correspondientes. Lo que nunca hice fue
convertir el tamaño de las imágenes a twips.
Saludos
Viviana
----- Original Message -----
From: Prodytec S.A.
To: vbusers List Member
Sent: Wednesday, December 19, 2007 4:40 PM
Subject: [vbusers] Imagenes en crystal report
No les comente que no utilizamos los reportes embebidos en la aplicación sino
en archivos de extensión RPT.
Aguardo sus Comentarios.
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre de
alberto.biancheri
Enviado el: Miércoles, 19 de Diciembre de 2007 01:31 p.m.
Para: vbusers List Member
Asunto: [vbusers] Imagenes en crystal report
en el reporte insertá un objeto ole, imagen mapa de bits.
Hace doble click en la sección del reporte para acceder al código fuente y
pegá esto:
Dim bmpHold As StdPicture ' object to hold the bitmap
Dim iModNum As Integer
' Set our variable to an bitmap
Set bmpHold = LoadPicture(App.Path & "\tulogo.bmp")
' Set the height and width of the Report object equal to the actual
values for
' the bitmap - the StdPicture object defaults to HiMetric, the Report
uses twips
' Set the bitmap on the Report equal to the variable
Set cOleObj.FormattedPicture = bmpHold
cOleObj.Height = bmpHold.Height * 567 / 1000 ' convert from
HiMetric to Twips
cOleObj.Width = bmpHold.Width * 567 / 1000 ' convert from
HiMetric to Twips
Espero te sirva, saludos
-----Original Message-----
From: "Prodytec S.A." <[EMAIL PROTECTED]>
To: "vbusers List Member" <[email protected]>
Date: Wed, 19 Dec 2007 11:34:10 -0300
Subject: [vbusers] Imagenes en crystal report
Hola Gente:
Necesitamos agregar en todos nuestros listados (130 aprox) un campo de
imagen que sea variable para que cada uno de nuestros clientes coloque su
logotipo y quede personalizado. Nos podrán guiar con algunas opciones de cómo
hacer esto.
Desde ya Muchas Gracias.
PD: La conexión con la base de datos que es de MS SQL 2000, la realizamos
como datos Activos TTX.
Todos los puestos tienen acceso a una carpeta del servidor Ej.:
\\Servidor\Sistema\XXXX\Imagenes\*.*
Saludos.
Sebastian Moreyra
Investigación y Desarrollo
Prodytec - La Evolución en Soluciones Tecnológicas
54-11-4811-1198 / 4814-2824
[EMAIL PROTECTED]
www.prodytec.com.ar
CONFIDENCIALIDAD: Este mensaje y sus archivos agregados pueden contener
información confidencial y han sido enviados a la atención personal del
destinatario. Si Ud. lo ha recibido por error por favor comuníquenoslo
inmediatamente por la misma vía y luego elimínelo del sistema. Muchas gracias.
CONFIDENTIALITY: This message and any attachments herein may contain
confidential information and have been sent to the personal attention of the
addressee. If you are not intended to receive this information please advise
the sender immediately by e-mail and delete this message without making any
copies. Thanks.
__________ Información de NOD32, revisión 2732 (20071219) __________
Este mensaje ha sido analizado con NOD32 antivirus system
http://www.nod32.com
__________ Información de NOD32, revisión 2733 (20071219) __________
Este mensaje ha sido analizado con NOD32 antivirus system
http://www.nod32.com