viernes, 27 de abril de 2012

Crystal Reports 9 en PowerBuilder

Primero creamos un Control Ole insertando el Cristal Report Viewer en la Ventana
Luego en un Boton ponemos el siguiente Codigo.
Todavia no se como pasarle parametros.
Asi que Continuara

int li_rtn
any la_valor
OLEObject lole_crystal
lole_crystal = CREATE OLEObject
li_rtn = lole_crystal.ConnectToNewObject( "CrystalRuntime.Application.9" )
if li_rtn=0  then
    if li_rtn=0  then
        la_valor=lole_crystal.OpenReport("C:\Recibo.rpt", 1)
        ole_1.Object.ReportSource=la_valor
        ole_1.Object.ViewReport()
    end if
end if

No hay comentarios: