Export without preview

Stimulsoft Reports.PHP discussion
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Export without preview

Post by Alex K. »

Hello,

You can find samples at the following links:
https://github.com/stimulsoft/Samples-JS-PHP
https://github.com/stimulsoft/Samples-JS

Thank you.
catalin
Posts: 23
Joined: Sat Jan 30, 2016 10:31 am

Re: Export without preview

Post by catalin »

Hi Alexey,
Your answers do not clarify me.
Please read carefully and answer me to each question.

1. The reports made with Stimulsoft Reports.Fx for PHP Version 2016.1 from 2016.02.16 are compatible with Stimulsoft Reports.JS Version 2016.1 (web based)?
I try to open an report with the new version and I receive a message "Error!", nothing else

2. The Stimulsoft Reports.JS Version 2016.1 can connect to MySQL and execute a query?
I made a MySQL connection and I retrieve all tables from a database. But it's impossible to put a query as in old version. After testing the connection I see a window that import all tables in database but I don't need the tables I want to write a query. I read the documentation and the app is not working as the documentation says.

3. Viewer.php is able to extract connection data, connect to MySQL, populate the datasource and show the report?
The samples of Github only feed from Demo.json. Where can I find a sample with MySQL connection from the viewer?

4. It's possible to pass parameters to the reports through HTTP GET method?
In the actual version index.php does nothing

5. It's possible to merge reports in PHP?
This is the initial question of this post. Where can I find a PHP sample?

6. Is there any automate method to convert the old reports to work with .JS version?

Conclusion:
The flash version was awesome. The only problem is that it could not merge reports. Do I have a bad version of Reports.JS and this is the reason of my problems?
If I'm wrong and I don't know to use this tool I apologize, otherwise I will have to search another tool but I'm angry to lost a lot of time to learn this tool and to make a lot of reports. I think this is not a good image for your company.

If should I pay something, please let me know. I need a solution.

Best regards, Catalin
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Export without preview

Post by Alex K. »

Hello,
1. The reports made with Stimulsoft Reports.Fx for PHP Version 2016.1 from 2016.02.16 are compatible with Stimulsoft Reports.JS Version 2016.1 (web based)?
I try to open an report with the new version and I receive a message "Error!", nothing else
Please check the last prerelease build 2017.1.0.3 from 2017.03.18. If the issue still present, please send us a sample report for analysis.
2. The Stimulsoft Reports.JS Version 2016.1 can connect to MySQL and execute a query?
I made a MySQL connection and I retrieve all tables from a database. But it's impossible to put a query as in old version. After testing the connection I see a window that import all tables in database but I don't need the tables I want to write a query. I read the documentation and the app is not working as the documentation says.
Yes, it is possible. Please select "New Query" on the DataBase Schema window.
3. Viewer.php is able to extract connection data, connect to MySQL, populate the datasource and show the report?
The samples of Github only feed from Demo.json. Where can I find a sample with MySQL connection from the viewer?
Yes, it is possible. You can use method $handler->onBeginProcessData, in handler.php file.
The method will be called when report connect to the data, here you can check and change the ConnectionString or SQL query if needed.
4. It's possible to pass parameters to the reports through HTTP GET method?
In the actual version index.php does nothing
Yes, you need to add a JavaScript code that automatically assigns GET variables whose names correspond to the names of the report variables. In this topic of our forum, you can find samples:
viewtopic.php?f=27&t=42201
5. It's possible to merge reports in PHP?
This is the initial question of this post. Where can I find a PHP sample?
We need some time to prepare the sample for you.
6. Is there any automate method to convert the old reports to work with .JS version?
All reports should work in the JS version. Please check the last build.

Thank you.
catalin
Posts: 23
Joined: Sat Jan 30, 2016 10:31 am

Re: Export without preview

Post by catalin »

Hello Alexey,
I tried the last prerelease Stimulsoft Reports.PHP 2017.1.0.4 from 2017.03.25 and I found few errors:

1. The designer (Windows) cannot create SQL parameters. The button new parameter does not exists.

2. I wrote the query with parameter in both way: @parameter and {parameter}. The designer doesn't recognize the syntax.

3. Run button "!" always return success message even if the query is bad.

I hope you solve this problems and I wait the sample you promised me.

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

Re: Export without preview

Post by Alex K. »

Hello,

At the current moment, parameters are not supported in the JS version. You can use variables in this case:
select * from Table where Column = {Variable}
3. Run button "!" always return success message even if the query is bad.
Need some time to fix this issue.

Thank you.
catalin
Posts: 23
Joined: Sat Jan 30, 2016 10:31 am

Re: Export without preview

Post by catalin »

Hi Aleksey,

Do you have the example that you promised me how to merge multiple mrt in one report in PHP? I need a solution urgently, please.

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

Re: Export without preview

Post by Alex K. »

Hello,

You can use the following code:

Code: Select all

var report1 = new Stimulsoft.Report.StiReport();
report1.loadFile("Reports/1.mrt");

var report2 = new Stimulsoft.Report.StiReport();
report2.loadFile("Reports/2.mrt");

var reportMerge = new Stimulsoft.Report.StiReport();
reportMerge.reportUnit = report1.reportUnit;
reportMerge.render();
reportMerge.renderedPages.clear();

report1.renderAsync(function () {
    for (var index = 0; index < report1.renderedPages.count; ++index) {
        reportMerge.renderedPages.add(report1.renderedPages.getByIndex(index));
    }
});

report2.renderAsync(function () {
    for (var index = 0; index < report2.renderedPages.count; ++index) {
        reportMerge.renderedPages.add(report2.renderedPages.getByIndex(index));
    }
});


viewer.report = reportMerge;
viewer.renderHtml("viewerCont");
Thank you.
Post Reply