CRYSTAL REPORT need help (Passing parameter)
Posted: Wed Apr 12, 2017 3:35 am
Dear All,
I need to use CRYSTAL REPORT XI but I cannot run the sample program from Fernando González Diez's sample. I occur an error as picture.
I use xHB, FWH1612, BCC7 and CR XI.
image hosting
Thanks for any help or idea.
I need to use CRYSTAL REPORT XI but I cannot run the sample program from Fernando González Diez's sample. I occur an error as picture.
I use xHB, FWH1612, BCC7 and CR XI.
image hosting
Code: Select all
// Our first Window in FiveWin !!!
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oActiveX, oCRApp, oRpt
oCRApp := CreateObject("CrystalRuntime.Application.11")
oRpt := oCRApp:OpenReport("C:\Users\dutch\Desktop\CR11\testcr11.rpt")
DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 ;
TITLE "Welcome to " + FWDESCRIPTION COLOR "W/B"
oActiveX := TActiveX():New( oWnd, "CrystalReports11.ActivexReportViewer.1" )
oWnd:oClient := oActiveX
oActiveX:SetProp( "ReportSource", oRpt )
oActiveX:SetProp( "EnableStopButton", 1 )
oActiveX:SetProp( "EnableAnimationCtrl", 0 )
oActiveX:SetProp( "EnableCloseButton", 1 )
oActiveX:SetProp( "EnableExportButton", 1 )
oActiveX:SetProp( "EnablePopupMenu", 0 ) // revisar, es interesante pero da error
oActiveX:SetProp( "EnableRefreshButton", 0 )
oActiveX:bOnEvent = { | event, aParams | EventInfo( event, aParams, oRpt, oActivex ) }
oActiveX:Do( "Viewreport" )
ACTIVATE WINDOW oWnd ;
VALID MsgYesNo( "Are you sure?", "Do you want to exit?" )
return nil
function EventInfo( event, aParams, oRpt, oActivex )
local cMsg := cValToChar( event ) //+ CRLF
return cMsg