FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MariaDB on Crystal Reports (SOLVED)
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
MariaDB on Crystal Reports (SOLVED)
Posted: Thu May 10, 2018 04:00 AM

Hi guys!

It's been a while.

I am in a process of convincing my company to upgrade from FW16.x to 18.x for a new project.
I intend to use MariaDB and Crystal Reports (Beautifully Integrated with FWH) ...

Are there anyone using both and passing MariaDB database->table to Crystal Reports?

Any idea are high appreciated.

Thanks,
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
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
MariaDB on Crystal Rerports (WORKAROUND)
Posted: Fri May 11, 2018 01:19 AM

Hi All,

Thanks for reading.

May workaround is to export rowset using ::SaveToDBF('select * from table', 'table.dbf' ), then pass this table to Crystal Reports.

Any better idea is welcome.

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
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: MariaDB on Crystal Rerports
Posted: Fri May 11, 2018 03:01 AM

Hi,

You can use ado and odc to connect Crystal report directly With database using this string conection:

Provider=MSDASQL.1;Password=YOUR_PASSWORD;Persist Security Info=True;User ID=YOUR_DB_USERT;Extended Properties="Driver={MySQL ODBC 5.1 Driver};Server=YOUR_SERVER;DefaultDatabase=YOUR_DATABASE;Database=YOUR_DATABASE;Port=3306;User=YOUR_DB_USER;Option=3"

Regards,

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: MariaDB on Crystal Rerports
Posted: Fri May 11, 2018 04:06 AM

If I have large data as an array in memory, how can I use Crystal Reports to print that data?

Regards



G. N. Rao.

Hyderabad, India
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: MariaDB on Crystal Rerports
Posted: Fri May 11, 2018 06:00 AM
nnicanor wrote:Hi,

You can use ado and odc to connect Crystal report directly With database using this string conection:

Provider=MSDASQL.1;Password=YOUR_PASSWORD;Persist Security Info=True;User ID=YOUR_DB_USERT;Extended Properties="Driver={MySQL ODBC 5.1 Driver};Server=YOUR_SERVER;DefaultDatabase=YOUR_DATABASE;Database=YOUR_DATABASE;Port=3306;User=YOUR_DB_USER;Option=3"

Regards,


Hi Nicanor,

The PC Client has no ADO or Connector installed (not ideal at the moment).
So I am looking how to directly pass the recordset (MariaDB) to Crystal Report as table.

Thanks for sharing the connection string.. It is useful on a different case.
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
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: MariaDB on Crystal Rerports
Posted: Fri May 11, 2018 06:04 AM
nageswaragunupudi wrote:If I have large data as an array in memory, how can I use Crystal Reports to print that data?



Hi Mr. Rao,

The current Crystal Report Class in FWH does not support access to Array.. It was my long time problem :-)
What I did was to save the array to a table which can be pass to Crystal Reports.
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
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: MariaDB on Crystal Rerports
Posted: Fri May 11, 2018 11:40 AM

Hi,

Only you must install Maria DB odb driver on client and connect to DB directly you don't need to make any changes in source code.

and using string connection to connect cristal to database

Regards,

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: MariaDB on Crystal Reports
Posted: Sat Aug 04, 2018 01:14 AM
Hi All,

I would like to update this thread. Please allow me to share :-)

First, using MariaDB ODBC Connector v3.x which you can download from MariaDB website
2nd, using Crystal Reports ActiveX ...

Code (fw): Select all Collapse
cConnStr := 'Driver={MariaDB ODBC 3.0 Driver};Server=192.168.1.1;Port=3306;DB=YourDatabase;UID=YourUserID;PWD=YourPassword;'

...

crApp := CreateObject("CrystalRuntime.Application.9")  //or "CreateObject("CrystalRuntime.Application.8.5")" for 8.5
crApp:LogonServerEx( 'crdb_odbc.dll',,,,,,cConnStr)

...

crRpt := crApp:OpenReport( 'YourReport.rpt' )
crRpt:Database:Tables[1]:SetLogOnInfo('Your ODBC DSN', cConnStr)

//in case you want to change the table (of course, with identical columns)
crRpt:Database:Tables[1]:Location := 'Name_Of_New_Table'

...

crVew := TActiveX():New( oWnd, 'CRViewer9.CRViewer')  //or "crVew := TActiveX():New( oWnd, 'CRViewer.CRViewer')" depending on your version, I am using 8.5 and 9.2

...

crVew:ReportSource( crRpt )
crVew:ViewReport()

//THAT's IT!!!


:-)
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

Continue the discussion