Hola,
Estoy utilizando Fivewin 2.7 + xHarbour + Crystal Reports 9.2 + WinXP.
Em mi computador, donde instale CRYSTAL REPORTS mi TESTE.EXE funciona bién, pero en otro computador el no ejecuta. Ocurre lo error
"Could not output to Window!"
cuándo ejecuta la linea abajo:
oCrystal:PEOutputToWindow(oVentHija)
Eso es mi PRG ejemplo:
#INCLUDE "fivewin.CH"
FUNCTION Main()
PUBLIC oWnd, oCrystal
oCrystal := TCCRPE():NEW()
DEFINE WINDOW oWnd MENU CreaMenu() MDI
ACTIVATE WINDOW oWnd VALID (oCrystal:PECloseEngine(),.T.)
RETURN (.T.)
FUNCTION CreaMenu()
LOCAL oMenu
MENU oMenu
MenuItem "Prueba" Action RunReport()
ENDMENU
RETURN (oMenu)
************************************
FUNCTION RunReport()
************************************
LOCAL oVentHija, hReport
cReportName := cGetFile("*.rpt","Choose Report")
DEFINE WINDOW oVentHija MDICHILD OF oWnd
oCrystal:PEOpenPrintJob(cReportName)
oCrystal:PEOutputToWindow(oVentHija)
oCrystal:PESetTabLocation("c:\rpartic.dbf")
ACTIVATE WINDOW oVentHija ON INIT (oCrystal:PeStartPrintJob(), hReport := oCrystal:PEGetWindowHandle(),WndSetSize(hReport,oVentHija:nWidth-7,oVentHija:nHeight-8,.T.));
ON PAINT (WndSetSize(hReport,oVentHija:nWidth-7,oVentHija:nHeight-8,.T.));
VALID (oCrystal:PEClosePrintJob(),.T.)
RETURN (.T.)
Yo copie las DLLs para C:\WINDOWS\SYSTEM32.
Hay algo más que yo pueda hacer?
Gracias adelantado,
Luciano
Crystal Reports
Re: Crystal Reports
Hi,
I am trying to use Crystal Reports XI. I don't have a clue where to start, so I used your code above.
Unresolved external _HB_FUN_TCCRPE
Please tell mw what I'm missing.
Thanks.
I am trying to use Crystal Reports XI. I don't have a clue where to start, so I used your code above.
Unresolved external _HB_FUN_TCCRPE
Please tell mw what I'm missing.
Thanks.
Many thanks
Ollie.
Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
Ollie.
Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
- Biel EA6DD
- Posts: 680
- Joined: Tue Feb 14, 2006 9:48 am
- Location: Mallorca
- Contact:
Re: Crystal Reports
Tccrpe is a class to mange Crystal Reports, but if you are going to use Crystal XI best try using ActiveX, you will find some samples on this forums. Search for "CrystalRunTime.Application".
Here you are a sample how to use CR XI
Here you are a sample how to use CR XI
Code: Select all
...
oCrys:=tOleAuto():New("CrystalRunTime.Application")
oRpt:=oCrys:OpenReport(oAppl:cDirRpt+"file.rpt") //Report File
oRpt:Database:Tables(1):Location:=oAppl:cDirRpt+'file.dbf' //DBF File
IF oRPt:HasSavedData
oRPT:DiscardSavedData()
ENDIF
oCrRpt:=tActiveX():New(oWnd,"CrystalReports11.ActiveXReportViewer.1")
oCrRpt:SetProp("ReportSource",oRpt)
oCrRpt:SetProp("DisplayGroupTree",.F.)
oCrRpt:DO("ViewReport")
oWnd:oClient:=oCrRpt
ACTIVATE WINDOW oWnd VALID (oCrRpt:END(),oCrys:END(),oRpt:END(),.T.)
Re: Crystal Reports
Dear Biel,Biel EA6DD wrote:Tccrpe is a class to mange Crystal Reports, but if you are going to use Crystal XI best try using ActiveX, you will find some samples on this forums. Search for "CrystalRunTime.Application".
Here you are a sample how to use CR XICode: Select all
... oCrys:=tOleAuto():New("CrystalRunTime.Application") oRpt:=oCrys:OpenReport(oAppl:cDirRpt+"file.rpt") //Report File oRpt:Database:Tables(1):Location:=oAppl:cDirRpt+'file.dbf' //DBF File IF oRPt:HasSavedData oRPT:DiscardSavedData() ENDIF oCrRpt:=tActiveX():New(oWnd,"CrystalReports11.ActiveXReportViewer.1") oCrRpt:SetProp("ReportSource",oRpt) oCrRpt:SetProp("DisplayGroupTree",.F.) oCrRpt:DO("ViewReport") oWnd:oClient:=oCrRpt ACTIVATE WINDOW oWnd VALID (oCrRpt:END(),oCrys:END(),oRpt:END(),.T.)
I have CRW8.5 I'd like to try and use similar to your code above using ActiveX..
I'm using wrapper for CRPE32.DLL right now. There's a lot of limitations.
I think ActiveX could be my solution.
what Crystal Reports files need?
how to run this on client PC without Crystal Reports installed?
Regards,
Frances
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Re: Crystal Reports
Dear All,
for your info:
In order this oCrystal := CreateObject("CrystalRuntime.Application") NOT TO FAIL on your client pc
you must register regsvr32 <path>\craxdrt.dll that must be included in your app.exe path.
In order this oCRViewer := TActiveX():New( oWnd, "CRViewer.CRViewer" ) NOT TO FAIL on your client pc
you must register regsvr32 <path>\crviewer.dll that must be included in your app.exe path.
Here are some of the activex properties you can make use of... like this oCRViewer:SetProp( "EnableExportButton", 1 )
Regards,
Frances
for your info:
In order this oCrystal := CreateObject("CrystalRuntime.Application") NOT TO FAIL on your client pc
you must register regsvr32 <path>\craxdrt.dll that must be included in your app.exe path.
In order this oCRViewer := TActiveX():New( oWnd, "CRViewer.CRViewer" ) NOT TO FAIL on your client pc
you must register regsvr32 <path>\crviewer.dll that must be included in your app.exe path.
Here are some of the activex properties you can make use of... like this oCRViewer:SetProp( "EnableExportButton", 1 )
for more info http://forums.fivetechsupport.com/viewt ... pplicationDisplayBackgroundEdge
DisplayBorder
DisplayGroupTree
DisplayTabs
DisplayToolbar
EnableAnimationCtrl
EnableCloseButton
EnableDrillDown
EnableGroupTree
EnableNavigationControls
EnablePrintButton
EnableProgressControl
EnableRefreshButton
EnableSearchControl
EnableStopButton
EnableToolbar
EnableZoomControl
Regards,
Frances
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15