report is not displayed initially

Stimulsoft Reports.PHP discussion
Post Reply
jlgazoli
Posts: 3
Joined: Wed May 20, 2020 5:27 pm

report is not displayed initially

Post by jlgazoli »

Hello.
I use the Stimulsoft Reports.PHP package in the trial version.
In the old version 2018 everything worked normally. This week I updated to version 2020.2.3. Everything works normally, with the exception of one event. After executing the code:
function onLoad () {viewer.renderHtml ("viewerContent"); }
the report is not initially displayed, only the toolbar. If I click, for example, in the "preview mode" of "Single page", or any other event, the report appears, created correctly as in the 2018 version. No error occurs, only this unpleasant behavior. I tested on Chrome, Firefox, the same thing.
In the 2018 version this problem does not happen.
Do you have any idea how I could solve this problem.
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: report is not displayed initially

Post by Lech Kulikowski »

Hello,

Please send us your request with detailed description on support@stimulsoft.com.

Thank you.
jlgazoli
Posts: 3
Joined: Wed May 20, 2020 5:27 pm

Re: report is not displayed initially

Post by jlgazoli »

Lech Kulikowski wrote: Thu May 21, 2020 9:20 am Hello,

Please send us your request with detailed description on support@stimulsoft.com.

Thank you.
Thank you.
I sent the request to the support email.

Here is a short video demonstrating the behavior.
http://www.fluidocosmico.com/stimulsoft/StimulSoft.mp4


The operating system is Centos 7 - 64bit.
[root@noteserver ReportPHP_StimulSoft]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.8.2003 (Core)
Release: 7.8.2003
Codename: Core


This is the php code that generates the report :

************************************************
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Visualização de Relatórios</title>

<!-- Report Office2013 style -->

<link href="<?php echo URL_HTTP_SERVER_PORT . rtrim( INDEX_URL_POST, '/' ) . '/ReportPHP_StimulSoft/JS/'?>css/stimulsoft.viewer.office2013.whiteteal.css" rel="stylesheet">

<!-- Stimusloft Reports.JS -->

<script src="<?php echo URL_HTTP_SERVER_PORT . rtrim( INDEX_URL_POST, '/' ) . '/ReportPHP_StimulSoft/JS/'?>scripts/stimulsoft.reports.js" type="text/javascript"></script>

<script src="<?php echo URL_HTTP_SERVER_PORT . rtrim( INDEX_URL_POST, '/' ) . '/ReportPHP_StimulSoft/JS/'?>scripts/stimulsoft.viewer.js" type="text/javascript"></script>


<style>
#StiViewer_ParametersPanel {
display: none;
}
</style>

<?php
$options = StiHelper::createOptions();

$options->handler = "relatorios/includes/Relatorio_handler_geral.php";

$options->timeout = 30;
StiHelper::initialize($options);

StiHelper::createHandler();


?>


<script type="text/javascript">

Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile("<?php echo URL_HTTP_SERVER_PORT . rtrim( INDEX_URL_POST, '/' ) . '/ReportPHP_StimulSoft/JS/' . 'localization/pt-BR.xml' ?>", false, 'Portuguese (Brazil)');
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("<?php echo URL_HTTP_SERVER_PORT . rtrim( INDEX_URL_POST, '/' ) . '/ReportPHP_StimulSoft/JS/' . 'localization/pt-BR.xml' ?>" );
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("<?php echo URL_HTTP_SERVER_PORT . rtrim( INDEX_URL_POST, '/' ) . '/ReportPHP_StimulSoft/JS/' . 'localization/pt-BR.xml' ?>", true);

// Specify necessary options for the viewer
var options = new Stimulsoft.Viewer.StiViewerOptions();
options.appearance.fullScreenMode = true;

options.height = "100%";

options.appearance.scrollbarsMode = true;
options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table;

options.toolbar.visible = true;
options.toolbar.showSendEmailButton = true;
//options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct;
options.toolbar.showPrintButton = true;
options.toolbar.showSaveButton = true;
options.toolbar.showBookmarksButton = true;
options.toolbar.showParametersButton = true;
options.toolbar.showEditorButton = true;
options.toolbar.showFullScreenButton = true;
options.toolbar.showFirstPageButton = true;
options.toolbar.showPreviousPageButton = true;
options.toolbar.showCurrentPageControl = true;
options.toolbar.showNextPageButton = true;
options.toolbar.showLastPageButton = true;
options.toolbar.showZoomButton = true;
options.toolbar.showViewModeButton = true;
options.toolbar.showDesignButton = false;
options.toolbar.showAboutButton = true;
options.toolbar.viewMode = Stimulsoft.Viewer.StiWebViewMode.OnePage; //Stimulsoft.Viewer.StiWebViewMode.WholeReport
options.toolbar.menuAnimation = true;
options.toolbar.showMenuMode = Stimulsoft.Viewer.StiShowMenuMode.Click;
options.toolbar.zoom = 150;

options.exports.showExportDialog = true;
options.exports.showExportToDocument = true;
options.exports.showExportToPdf = true;
options.exports.showExportToHtml = true;
options.exports.showExportToWord2007 = true;
options.exports.showExportToExcel2007 = true;

var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);

// Process SQL data source
viewer.onBeginProcessData = function (event, callback) {
<?php StiHelper::createHandler(); ?>
}

// Manage export settings on the server side
viewer.onBeginExportReport = function (args) {
<?php //StiHelper::createHandler(); ?>
//args.fileName = "MyReportName";
}

// Process exported report file on the server side
/*viewer.onEndExportReport = function (event) {
event.preventDefault = true; // Prevent client default event handler (save the exported report as a file)
<?php StiHelper::createHandler(); ?>
}*/

// Send exported report to Email
viewer.onEmailReport = function (event) {
<?php StiHelper::createHandler(); ?>
}

// Load and show report
var report = new Stimulsoft.Report.StiReport();

console.log("Before LoadFile");

report.loadFile('<?php echo "$sNomeFormLoad"?>');

// debug
var myVar = setInterval(myTimer, 2000);

function myTimer() {

if (viewer.report.isRendered == true){

window.clearInterval(myVar);

console.log("Rendered!");

//saveReportPdf();
// alert( "isRendered" );

}

}


</script>
</head>
<body onload="onLoad();">
<div id="viewerContent"></div>
</body>
</html>

************************************************
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: report is not displayed initially

Post by Lech Kulikowski »

Hello,

Thank you. We will check it and will let you know about the result.
jlgazoli
Posts: 3
Joined: Wed May 20, 2020 5:27 pm

Re: report is not displayed initially

Post by jlgazoli »

Lech Kulikowski wrote: Fri May 22, 2020 7:13 am Hello,

Thank you. We will check it and will let you know about the result.
Hello.
As directed by the support team,
removing obsolete options from the code worked perfectly.
Thank you.

// obsoletes: OnePage, WholeReport
//options.toolbar.viewMode = Stimulsoft.Viewer.StiWebViewMode.OnePage; //Stimulsoft.Viewer.StiWebViewMode.WholeReport
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: report is not displayed initially

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply