Crystal XI y xharbour
-
- Posts: 4
- Joined: Mon Mar 19, 2007 8:17 pm
- Location: Venezuela
Crystal XI y xharbour
Saludos Amigos, aca traigo un problema para evr en que se me puede ayudar, me quede en el fwh24 y el xharbour ya ni me acuerdo la version pero es un poco vieja, uso crystal Report 7.0 pero necesito exportar mis reportes a PDF cosa el que 7.0 no hace tengo la Version XI que si exporta pero quisiera saber si alguien usa estar version y es compatible con la que uso con el 7.0 o si tiene una rutina para esta version y si es posible hacermela llegar a mi Correo, agradeciendo de antemano la Atencion de esta Solicitud Queda de Ustedes Antonio P.
Mail: venezolano1963@yahoo.com
Mail: venezolano1963@yahoo.com
Amigo: checate en el super google por el PDFCreator
http://www.google.com.mx/search?hl=es&q ... ator&meta=
saludos
Luis Fernando Rubio Rubio
http://www.google.com.mx/search?hl=es&q ... ator&meta=
saludos
Luis Fernando Rubio Rubio
Luis Fernando Rubio Rubio
- Pedro Faro
- Posts: 31
- Joined: Sun Jan 29, 2006 6:34 pm
- Location: Lisboa-Portugal
- Contact:
- Biel EA6DD
- Posts: 680
- Joined: Tue Feb 14, 2006 9:48 am
- Location: Mallorca
- Contact:
Previsualizacion en pantalla
Impresion sin pre,
Code: Select all
oCrys:=tOleAuto():New("CrystalRunTime.Application")
oRpt:=oCrys:OpenReport(oAppl:cDirRpt+"QSL.rpt")
oRpt:Database:Tables(1):Location:=oAppl:cDirRpt+'Log.dbf'
IF oRPt:HasSavedData //si tenia datos guardados con el reporte, lo borra.
oRPT:DiscardSavedData() //obligando asi la lectura desde el fichero dbf.
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.)
Code: Select all
oCrys:=tOleAuto():New("CrystalRunTime.Application")
oRpt:=oCrys:OpenReport(oAppl:cDirRpt+"QSL.rpt")
oRpt:Database:Tables(1):Location:=oAppl:cDirRpt+'Log.dbf'
IF oRPt:HasSavedData //si tenia datos guardados con el reporte, lo borra.
oRPT:DiscardSavedData() //obligando asi la lectura desde el fichero dbf.
ENDIF
oRpt:PrintOut(.f.)
oRpt:END()
oCrys:END()
- Biel EA6DD
- Posts: 680
- Joined: Tue Feb 14, 2006 9:48 am
- Location: Mallorca
- Contact:
Por cierto Rene, como te las arreglas para distribuir Crystal con tus aplicaciones.
A mi solo me ha ido bien con InstallShield, pero el tamaño de la instalacion es muy grande, y aunque dice que puedes marcar que modulos incluir, a mi no me hace ni caso y siempre me pone todos los modulos en la instalacion.
A mi solo me ha ido bien con InstallShield, pero el tamaño de la instalacion es muy grande, y aunque dice que puedes marcar que modulos incluir, a mi no me hace ni caso y siempre me pone todos los modulos en la instalacion.
- mario.paiva
- Posts: 6
- Joined: Thu Apr 19, 2007 8:27 am
- Location: Lisboa
Crystal XI e xHarbour
Hi everybody,
Biel,
I tested with your code sample but when execute the app this error occurs:
"TOleAuto/-1 CO_E_CLASSSTRING: TOLEAUTO:NEW Args: [ 1] = C CrystalRunTime.Application"
I have Crystal Reports XI Professional with all components installed on my machine.
Thanks for the help,
Mário Paiva
Biel,
I tested with your code sample but when execute the app this error occurs:
"TOleAuto/-1 CO_E_CLASSSTRING: TOLEAUTO:NEW Args: [ 1] = C CrystalRunTime.Application"
I have Crystal Reports XI Professional with all components installed on my machine.
Thanks for the help,
Mário Paiva
- Biel EA6DD
- Posts: 680
- Joined: Tue Feb 14, 2006 9:48 am
- Location: Mallorca
- Contact:
- mario.paiva
- Posts: 6
- Joined: Thu Apr 19, 2007 8:27 am
- Location: Lisboa
Crystal with xHarbour
Hi Biel,
I downloaded and installed the Crystal XI Release 2 for developers just like you said and recompile the code with this modifications:
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oCrystal := CREATEOBJECT( "CrystalRuntime.Application" )
LOCAL oReport := oCrystal:OpenReport( "val_mov.rpt" )
LOCAL oWnd, oCRViewer
DEFINE WINDOW oWnd
oCRViewer = TActiveX():New( oWnd, "CrystalReports11.ActiveXReportViewer.1" )
oCRViewer:SetProp( "ReportSource", oReport )
oCRViewer:Do( "ViewReport" )
oWnd:oClient = oCRViewer
ACTIVATE WINDOW oWnd;
MAXIMIZED
RETURN NIL
And this is the error that popup from the app:
"FiveWin for Harbour GPF occurred
Called from CREATACTIVEX(0)
Called from TACTIVEX:NEW(0)
Called from MAIN(13)"
Is something missing in my code ?
Thanks again for the help,
Mário Paiva
I downloaded and installed the Crystal XI Release 2 for developers just like you said and recompile the code with this modifications:
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oCrystal := CREATEOBJECT( "CrystalRuntime.Application" )
LOCAL oReport := oCrystal:OpenReport( "val_mov.rpt" )
LOCAL oWnd, oCRViewer
DEFINE WINDOW oWnd
oCRViewer = TActiveX():New( oWnd, "CrystalReports11.ActiveXReportViewer.1" )
oCRViewer:SetProp( "ReportSource", oReport )
oCRViewer:Do( "ViewReport" )
oWnd:oClient = oCRViewer
ACTIVATE WINDOW oWnd;
MAXIMIZED
RETURN NIL
And this is the error that popup from the app:
"FiveWin for Harbour GPF occurred
Called from CREATACTIVEX(0)
Called from TACTIVEX:NEW(0)
Called from MAIN(13)"
Is something missing in my code ?
Thanks again for the help,
Mário Paiva
Yo instalo los modulos que vienen en la ayuda que tienen que instalarse, como 7 u 8 DLLs adicionales y como bien mencionas, efectivamente, la instalacion crece bastante, pero no hay de otra, Crystal requiere de muchos recursos.Biel EA6DD wrote:Por cierto Rene, como te las arreglas para distribuir Crystal con tus aplicaciones.
A mi solo me ha ido bien con InstallShield, pero el tamaño de la instalacion es muy grande, y aunque dice que puedes marcar que modulos incluir, a mi no me hace ni caso y siempre me pone todos los modulos en la instalacion.
Saludos
R.F.
R.F.
- Biel EA6DD
- Posts: 680
- Joined: Tue Feb 14, 2006 9:48 am
- Location: Mallorca
- Contact:
Gracias Rene por la respuesta, pues si no hay otra, nos tendremos que aguantar, un saludo.
Hi Mario,
now the error is at the creation of ActiveX. Look in your system the exact string maybe is diferent, in my system "CrystalReports11.ActiveXReportViewer.1" is ok and runnig fine.If I'm not wrong .1 is the version, so probably you must use .2 .
Any way you can use ActiveXXX to know all features of activex in your system.
http://activex.moonvalley.com/activexxx.htm
Hi Mario,
now the error is at the creation of ActiveX. Look in your system the exact string maybe is diferent, in my system "CrystalReports11.ActiveXReportViewer.1" is ok and runnig fine.If I'm not wrong .1 is the version, so probably you must use .2 .
Any way you can use ActiveXXX to know all features of activex in your system.
http://activex.moonvalley.com/activexxx.htm
Last edited by Biel EA6DD on Mon Jul 16, 2007 3:50 pm, edited 1 time in total.
- mario.paiva
- Posts: 6
- Joined: Thu Apr 19, 2007 8:27 am
- Location: Lisboa
Crystal XI y xharbour
Hi Biel,
Thanks again for helpful you explanations.
I run the app Activexxx and the information retrieved is CrystalReports115.ActiveXReportViewer.1. I pasted this in my code and it works !! Finaly i have the preview of Crystal Reports showing the information from the rpt previously created.
But something is missing ... The information within the rpt has not the information updated with the data dictionary created with Advantage Data Architect.
When i create or modify a register on the database and open the rpt via my app, i don't get the information updated. Aperantly when the app call´s the rpt, the connection to Advantage Database server is not established. Do i need to put something else in my code to referesh the data in the rpt ?
This is my environment:
Server:
1 - Advantage Database Server 8.1 Installed on a remote server
2 - Advantage Crystal Reports Driver 8.1
3 - The test app that is going to executed remotely on client machines
4 - The test rpt (made with Crystal pointed to an Advantage connection via Data dictionary )and the dll´s necessary to run the app remotely
5 - The data dictionary created with Advantage Data Architect
Client Machine:
1 - All necessary components to run the Crystal Reports Preview (It´s working fine)
2 - A shortcut to the test app to be executed on the Server.
3 - All communication dll´s necessary to run the app
Everything works fine but as i already said the information on the rpt is not updated with the data dictionary.
This is my code:
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oCrystal := CREATEOBJECT( "CrystalRuntime.Application" )
LOCAL oReport := oCrystal:OpenReport( "mestre_artigos.rpt" )
LOCAL oWnd, oCRViewer
DEFINE WINDOW oWnd
oCRViewer = TActiveX():New( oWnd, "CrystalReports115.ActiveXReportViewer.1" )
oCRViewer:SetProp( "ReportSource", oReport )
oCRViewer:Do( "ViewReport" )
oWnd:oClient = oCRViewer
ACTIVATE WINDOW oWnd;
MAXIMIZED
RETURN NIL
Again Many thanks for your help.
Best regards,
Mário paiva
Thanks again for helpful you explanations.
I run the app Activexxx and the information retrieved is CrystalReports115.ActiveXReportViewer.1. I pasted this in my code and it works !! Finaly i have the preview of Crystal Reports showing the information from the rpt previously created.
But something is missing ... The information within the rpt has not the information updated with the data dictionary created with Advantage Data Architect.
When i create or modify a register on the database and open the rpt via my app, i don't get the information updated. Aperantly when the app call´s the rpt, the connection to Advantage Database server is not established. Do i need to put something else in my code to referesh the data in the rpt ?
This is my environment:
Server:
1 - Advantage Database Server 8.1 Installed on a remote server
2 - Advantage Crystal Reports Driver 8.1
3 - The test app that is going to executed remotely on client machines
4 - The test rpt (made with Crystal pointed to an Advantage connection via Data dictionary )and the dll´s necessary to run the app remotely
5 - The data dictionary created with Advantage Data Architect
Client Machine:
1 - All necessary components to run the Crystal Reports Preview (It´s working fine)
2 - A shortcut to the test app to be executed on the Server.
3 - All communication dll´s necessary to run the app
Everything works fine but as i already said the information on the rpt is not updated with the data dictionary.
This is my code:
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oCrystal := CREATEOBJECT( "CrystalRuntime.Application" )
LOCAL oReport := oCrystal:OpenReport( "mestre_artigos.rpt" )
LOCAL oWnd, oCRViewer
DEFINE WINDOW oWnd
oCRViewer = TActiveX():New( oWnd, "CrystalReports115.ActiveXReportViewer.1" )
oCRViewer:SetProp( "ReportSource", oReport )
oCRViewer:Do( "ViewReport" )
oWnd:oClient = oCRViewer
ACTIVATE WINDOW oWnd;
MAXIMIZED
RETURN NIL
Again Many thanks for your help.
Best regards,
Mário paiva
- mario.paiva
- Posts: 6
- Joined: Thu Apr 19, 2007 8:27 am
- Location: Lisboa
Crystal XI y xharbour
Hi again Biel,
Thanks to your examples (i missed the example code to Pedro Faro) sorry , i can finally put almost all things working fine includind the connection to ADS established and the rpt´s updated to the Crystal Reports preview !
Just one more thing to put the solution operational:
We need to now what are the components (Dll´s and what so ever) to distribute with our apps and put the client machines running the Crystal Report Preview XI without installing the entire setup of CRXI.
Thanks for the help and best regards,
Mário Paiva
Thanks to your examples (i missed the example code to Pedro Faro) sorry , i can finally put almost all things working fine includind the connection to ADS established and the rpt´s updated to the Crystal Reports preview !
Just one more thing to put the solution operational:
We need to now what are the components (Dll´s and what so ever) to distribute with our apps and put the client machines running the Crystal Report Preview XI without installing the entire setup of CRXI.
Thanks for the help and best regards,
Mário Paiva
- Biel EA6DD
- Posts: 680
- Joined: Tue Feb 14, 2006 9:48 am
- Location: Mallorca
- Contact:
Hi
about teh componets to distribute, I have tried some ways,(copyng Dlls, ...) with no success. The only way running for the moment is using installshield, inluding de msm files provided with Crystal Reports.
crystal CrystalReports11_RDC_License.msm
CrystalReports11_RDC_Reportengine.msm
CrystalReports11_RDC_Runtime.msm
Yo can try wiht other installer, but you need msm support. Let me know if you find any easy way to distribute.
about teh componets to distribute, I have tried some ways,(copyng Dlls, ...) with no success. The only way running for the moment is using installshield, inluding de msm files provided with Crystal Reports.
crystal CrystalReports11_RDC_License.msm
CrystalReports11_RDC_Reportengine.msm
CrystalReports11_RDC_Runtime.msm
Yo can try wiht other installer, but you need msm support. Let me know if you find any easy way to distribute.
- mario.paiva
- Posts: 6
- Joined: Thu Apr 19, 2007 8:27 am
- Location: Lisboa
Crystal XI y xharbour
Hi Biel,
Things are working fine with that 3 files included in the installation package. Apparently this is the only way putting the client machines running crystal. I have Read some white papers from Business Objects and they say this is the only way (supported) to do it .
Just one more thing, when I open a report a connection is established with ADS and works fine, but when I close the report, that connection is kept alive in ADS for about 3 minutes. Is there a way to immediately close the connection and the data base inside my code?
I search in Crystal Help and they have this information:
"Working with secure data in reports:
If your report connects to a secure data source that requires log on information, you must release the Report object from the Report Viewer before you can log off of the data source. This can be done by assigning a new Report object to the ReportSource property, or by closing the CRViewer object. Until this is done, the data source will not be released from the Report object and you cannot log off."
Thanks a lot again,
Best regards,
Mário Paiva
Things are working fine with that 3 files included in the installation package. Apparently this is the only way putting the client machines running crystal. I have Read some white papers from Business Objects and they say this is the only way (supported) to do it .
Just one more thing, when I open a report a connection is established with ADS and works fine, but when I close the report, that connection is kept alive in ADS for about 3 minutes. Is there a way to immediately close the connection and the data base inside my code?
I search in Crystal Help and they have this information:
"Working with secure data in reports:
If your report connects to a secure data source that requires log on information, you must release the Report object from the Report Viewer before you can log off of the data source. This can be done by assigning a new Report object to the ReportSource property, or by closing the CRViewer object. Until this is done, the data source will not be released from the Report object and you cannot log off."
Thanks a lot again,
Best regards,
Mário Paiva