Page 1 of 1

MariaDB on Crystal Reports (SOLVED)

Posted: Thu May 10, 2018 4:00 am
by fraxzi
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

MariaDB on Crystal Rerports (WORKAROUND)

Posted: Fri May 11, 2018 1:19 am
by fraxzi
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.

Re: MariaDB on Crystal Rerports

Posted: Fri May 11, 2018 3:01 am
by nnicanor
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,

Re: MariaDB on Crystal Rerports

Posted: Fri May 11, 2018 4:06 am
by nageswaragunupudi
If I have large data as an array in memory, how can I use Crystal Reports to print that data?

Re: MariaDB on Crystal Rerports

Posted: Fri May 11, 2018 6:00 am
by fraxzi
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.

Re: MariaDB on Crystal Rerports

Posted: Fri May 11, 2018 6:04 am
by fraxzi
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 :D
What I did was to save the array to a table which can be pass to Crystal Reports.

Re: MariaDB on Crystal Rerports

Posted: Fri May 11, 2018 11:40 am
by nnicanor
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,

Re: MariaDB on Crystal Reports

Posted: Sat Aug 04, 2018 1:14 am
by fraxzi
Hi All,

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

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

Code: Select all


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!!!

 
:P