MariaDB on Crystal Reports (SOLVED)

Post Reply
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

MariaDB on Crystal Reports (SOLVED)

Post 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
Last edited by fraxzi on Sat Aug 04, 2018 1:14 am, edited 1 time in total.
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
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

MariaDB on Crystal Rerports (WORKAROUND)

Post 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.
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
nnicanor
Posts: 296
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: MariaDB on Crystal Rerports

Post 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,
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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: MariaDB on Crystal Rerports

Post by nageswaragunupudi »

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
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Re: MariaDB on Crystal Rerports

Post 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.
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
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Re: MariaDB on Crystal Rerports

Post 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.
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
nnicanor
Posts: 296
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: MariaDB on Crystal Rerports

Post 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,
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
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Re: MariaDB on Crystal Reports

Post 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
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
Post Reply