Setting datasource programmatically

Stimulsoft Reports.PHP discussion
Post Reply
mahfouz
Posts: 10
Joined: Sun Sep 18, 2016 10:23 am

Setting datasource programmatically

Post by mahfouz »

Hi there.

Could someone show me in PHP how to set a report's data source to a MySQL server and database programmatically, please?

Regards
Mahfouz
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Setting datasource programmatically

Post by Alex K. »

Hello,

Please check the sample at the following link:
https://www.stimulsoft.com/en/samples/p ... ta-sources

Thank you.
mahfouz
Posts: 10
Joined: Sun Sep 18, 2016 10:23 am

Re: Setting datasource programmatically

Post by mahfouz »

Hi Dear,
I'm using
library => Stimulsoft-Reports-PHP
version => 2016.1-Pack
sample => js

and i did not see handler->onBeginProcessData in handler.php
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting datasource programmatically

Post by HighAley »

Hello.

Please, upgrade to our latest build.
It was added later.

Thank you.
mahfouz
Posts: 10
Joined: Sun Sep 18, 2016 10:23 am

Re: Setting datasource programmatically

Post by mahfouz »

Hi,
I upgrade to latest build => FXPHP_2016.08.26

and I did not see the function
also, I trying to add it, but it did not work

I have set another question here from 2 days but I did not get any reply
viewtopic.php?f=18&t=52401

please give me a clear solution to connect with MySQL without add connection data into the report file
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting datasource programmatically

Post by HighAley »

Hello.

The onBeginProcessData is in the \Samples\stimulsoft\helper.php file.

This event is used in the Sample.

We have answered your second question too.

Thank you.
Post Reply