Page 1 of 2

No report is loaded in viewer through PHP

Posted: Tue Feb 28, 2012 1:51 am
by Super Bread
hello,

I followed the sample instruction to load the report via php but it is no report content is loaded.

1. Type this in the URL.
http://localhost/stimulsoft/index.php?s ... leList.mrt

2. Show the viewer only.

3. I need to press the open button to view the report. However, I want to open it automatically from php.

Please help, thanks.

No report is loaded in viewer through PHP

Posted: Wed Feb 29, 2012 1:43 am
by Vladimir
Hello,

Please do the following:

1. In the 'config.xml' file the EnableDataLogger option set to True in Connection section.
2. Run the report viewer.
3. Click on the 'Save Log File' button in the viewer's Save menu.
4. Save the text file and send it to us for analysis.

Thank you.

No report is loaded in viewer through PHP

Posted: Wed Feb 29, 2012 3:00 am
by Super Bread
The log file is attached for your analysis.

No report is loaded in viewer through PHP

Posted: Wed Feb 29, 2012 8:16 am
by Vladimir
Hello,

Could you please send us an index.php file from stimulsoft folder that you use on your web server?

Thank you.

No report is loaded in viewer through PHP

Posted: Wed Feb 29, 2012 11:33 am
by Super Bread
index.php file is attached, please check. Thanks.

Note: please change the filename from index.bak to index.php because it cannot upload the index.php through your attachment screen. Thanks.

No report is loaded in viewer through PHP

Posted: Thu Mar 01, 2012 4:42 am
by Vladimir
Hello,

When loading a report the value of stimulsoft_report_key parameter is passed to the sti_get_report($report_key) method in the index.php file.

By default, this parameter is used as the name of the file that is loaded in the designer:

if (file_exists("../reports/$report_key")) return file_get_contents("../reports/$report_key");

This report file must be located in the following folder on your server:

http://localhost/stimulsoft/reports/

(the http://localhost/stimulsoft/reports/SimpleList.mrt file in you case).

You can change this behavior as you need by editing the sti_get_report method.

Thank you.

No report is loaded in viewer through PHP

Posted: Thu Mar 01, 2012 11:41 am
by Super Bread
Surely, that file (SimpleList.mrt) is located in http://localhost/stimulsoft/reports/SimpleList.mrt but it still cannot load the data in the report.

When I directly typed http://localhost/stimulsoft/reports/SimpleList.mrt in browser, it only can show the text on browser but not the report viewer.

Please help.

No report is loaded in viewer through PHP

Posted: Fri Mar 02, 2012 7:48 am
by Vladimir
Hello,

Sorry, our error.

The report file must be located in the following folder on your server:

http://localhost/reports/SimpleList.mrt

Alternatively, you can edit the PHP code:

if (file_exists("../reports/$report_key")) return file_get_contents("../reports/$report_key");

replace to:

if (file_exists("reports/$report_key")) return file_get_contents("reports/$report_key");

Thank you.

No report is loaded in viewer through PHP

Posted: Fri Mar 02, 2012 11:28 am
by Super Bread
After your instruction, the report file is changed to http://localhost/reports/SimpleList.mrt

It can show the data on browser but it also shows the error message Error#1088. What's it mean? I just use your sample file to load. Thanks.

No report is loaded in viewer through PHP

Posted: Tue Mar 06, 2012 3:11 am
by Vladimir
Hello,

Most likely, the report engine cannot find the data file. In the above mentioned reports directory shall be the following files:
SimpleList.mdc
SimpleList.mrt
SimpleListWithVariable.mrt
Demo.xml
Demo.xsd
Thank you.