Hi. sorry for my english.
I have several applications running with HMG, managing dbf and MySQL databases.
Now, I'm linking my apps with Crystal Reports using the Activex control, and it works very well, using this code:
In the main window design, I'm inserting the activex control with the next ID (it was hard find the correct ID):
DEFINE ACTIVEX CrystalControl
ROW 220
COL 10
WIDTH 0
HEIGHT 0
PROGID "Crystal.CrystalReport"
END ACTIVEX
In the button that trigs the report, the next properties are assigned:
PRINCIPAL.CrystalControl.Object:WindowTitle := "Reporte de Crystal"
PRINCIPAL.CrystalControl.Object:ReportFileName := "\Reportes\ArchivosCrystal\Archivo.rpt"
PRINCIPAL.CrystalControl.Object:WindowShowPrintSetupBtn := .t.
PRINCIPAL.CrystalControl.Object:PrintReport()
The last method call trigs the window of the report.
Now, the Crystal Activex Control have some properties very usefull to the personalization of the reports, because you can change the formulas and parameters in the report. This properties are managed like arrays, in the next form (this is the native Visual Basic language of the manual):
CrystalReport1.Formulas(0) = "COMISIÓN= {archivo.VENTAS} * .1"
Somebody would help me?
CrystalReport1.Formulas(1) = "TOTAL= {archivo.VENTAS} + {archivo.COMISIÓN}"
Now, when I tryed to call the property in HMG, in running time,it broke the program and displayed an error saying that it couldn't find the property. Don't work calling the property as:
PRINCIPAL.CrystalControl.Object:Formulas(0) := "TITULO='TITULO DEL REPORTE'"
neither:
PRINCIPAL.CrystalControl.Object:Formulas[0] := "TITULO='TITULO DEL REPORTE'"
neither:
Aadd(PRINCIPAL.CrystalControl.Object:Formulas,"TITULO='TITULO DEL REPORTE'"
Activex control and Crystal Reports
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Activex control and Crystal Reports
Hi,
I don't have any experience with Crystal Reports. I think somebody who is familiar with Crystal Reports may help you.
I have used one open source tool like that "Report Manager".
I don't have any experience with Crystal Reports. I think somebody who is familiar with Crystal Reports may help you.
I have used one open source tool like that "Report Manager".
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Activex control and Crystal Reports
¿And this Report Manager can connect with MySQL databases?
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Activex control and Crystal Reports
Yes. Of course. It can connect to any database with odbc connectivity.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Activex control and Crystal Reports
OK.... I'm now reviewing this alternative. Thanks a lot, but I plead you that analize the problem with the Crystal Activex. It refers about the parameters passed to the Object, that I think, HMG don't send the addecuate format waited by the OCX. If you had have some problem similar with another Activex code, I thank you a lot that post it. I spent many time building the report and I like present a solution integrated in place of two separated software, or rebuild it in another application.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Activex control and Crystal Reports
I understand your problem Gochito. IMHO, our members can help you from this.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.