Porting from Stimulsoft Reports PHP to Web
Porting from Stimulsoft Reports PHP to Web
Hi,
I am trying to convert my designer / viewer from PHP to designer / viewer HTML5/JS
would like to know how do I / Where do i add codes to programmatically add data source?
I am trying to convert my designer / viewer from PHP to designer / viewer HTML5/JS
would like to know how do I / Where do i add codes to programmatically add data source?
Re: Porting from Stimulsoft Reports PHP to Web
Hello.
Unfortunately, there is no manual about changing components from Flash to JS.
You could look at the Sample sites that you can find in our distributive.
Data Sources should be added in JavaScript code. You could find this code on our Knowledge Base.
We will be glad to answer any your questions.
Thank you.
Unfortunately, there is no manual about changing components from Flash to JS.
You could look at the Sample sites that you can find in our distributive.
Data Sources should be added in JavaScript code. You could find this code on our Knowledge Base.
We will be glad to answer any your questions.
Thank you.
Re: Porting from Stimulsoft Reports PHP to Web
Hi ,
I would just want to force the data source to appear from designer / viewer from code. How do i do it?
I would just want to force the data source to appear from designer / viewer from code. How do i do it?
Re: Porting from Stimulsoft Reports PHP to Web
Hello.
You could find it in the article on the link above. Here is this code:
Thank you.
You could find it in the article on the link above. Here is this code:
Code: Select all
var report = new Stimulsoft.Report.StiReport();
//Add data to datastore
report.regData("data", "data", dataSet);
//Fill dictionary
var dataSource = new Stimulsoft.Report.Dictionary.StiDataTableSource(data.tableName, data.tableName, data.tableName);
dataSource.columns.add(new Stimulsoft.Report.Dictionary.StiDataColumn("Column1", "Column1", "Column1"));
dataSource.columns.add(new Stimulsoft.Report.Dictionary.StiDataColumn("Column2", "Column2", "Column2"));
report.dictionary.dataSources.add(dataSource);
Re: Porting from Stimulsoft Reports PHP to Web
Hi HighAley,
Do you have a sample project which hardcode mysql connection string into the reports
Do you have a sample project which hardcode mysql connection string into the reports
Re: Porting from Stimulsoft Reports PHP to Web
Hello,
You can use following code to replace connection string in the report by new connection string:
);
Also please check following url: http://support.stimulsoft.com/index.php ... at-runtime
Let me know if you need any additional help!
Thank you.
You can use following code to replace connection string in the report by new connection string:
Code: Select all
report.Databases.Clear();
report.Databases.Add(new Stimulsoft.Report.Dictionary.StiMySqlDatabase("NameInReport", ConnectionString
Also please check following url: http://support.stimulsoft.com/index.php ... at-runtime
Let me know if you need any additional help!
Thank you.
Re: Porting from Stimulsoft Reports PHP to Web
Hi Jan ,
So is the code like so ?
where do i place this code?
So is the code like so ?
Code: Select all
report.Databases.Clear();
report.Databases.Add(new Stimulsoft.Report.Dictionary.StiMySqlDatabase("ConnectionNameInReport", "server=localhost;uid=root;pwd='pwd';db='testdb'");
Re: Porting from Stimulsoft Reports PHP to Web
Hello.
You should put this code after loading of the report and before showing it.
Thank you.
You should put this code after loading of the report and before showing it.
Thank you.
Re: Porting from Stimulsoft Reports PHP to Web
Hi HighAley,
realized that the code didn't work.
Only this works. We had to put a extra .dictionary
this code is then placed at designer.php
realized that the code didn't work.
Only this works. We had to put a extra .dictionary
this code is then placed at designer.php
Code: Select all
report.dictionary.databases.clear();
var database = new Stimulsoft.Report.Dictionary.StiMySqlDatabase("Demo","MySQL", "server=serveraddress;db=dbname;uid=userid;pwd=pass;");
report.dictionary.databases.add(database);
Re: Porting from Stimulsoft Reports PHP to Web
Hello.
Could you specify what product do you use?
We answered you how to do this in Reports.Web product.
You can't use this code in Reports.PHP.
Thank you.
Could you specify what product do you use?
We answered you how to do this in Reports.Web product.
You can't use this code in Reports.PHP.
Thank you.