Report Dahboards Errors
Posted: Thu Aug 26, 2021 2:19 pm
				
				I'm trying to implement dashboards in my program. I'm making some data coming from an API fill a graph and a table. I'm testing this on a dashboard and a report. In the dashboard this works normally, the data correctly fills the dashboard table and graph. In the report, using the same code used in the dashboard, I'm having the following errors:
Sometimes I have the error: qt.engine is null.
And sometimes I have the errors: this.components.getByIndex(...).as(...) is null.
t.dataBandInfo.groupHeaders is null
my code is like this:
Could this error for working with a dashboard and not working with a report be considered an incompatibility issue? If not, can anyone help me?
(*I'm Brazilian, so what's in Portuguese are just variable and method names)
			Sometimes I have the error: qt.engine is null.
And sometimes I have the errors: this.components.getByIndex(...).as(...) is null.
t.dataBandInfo.groupHeaders is null
my code is like this:
Code: Select all
$scope.teste = function () {
                var model = [{
                    identificacaoConsulta: "analytics.consultaBasicaDashboard",
                    filtros: []
                },
                {
                    identificacaoConsulta: "analytics.consultaBasica",
                    filtros: []
                }];
                PainelService.obterOpecJson()
                    .then(function (response) {
                        $scope.dashboardOpec = response.data;
                        $scope.createViewer();
                        $scope.setSelectedDashboardButton("DashboardOpec");
                        viewer.showProcessIndicator();
                        var dashboard = Stimulsoft.Report.StiReport.createNewDashboard();
                        dashboard.load($scope.dashboardOpec);
                        PainelService.ObterConsultaInfos(model)
                            .then(function (response) {
                                var consultaInfos = response.data;
                                for (i = 0; i < consultaInfos.length; i++) {
                                    var modelTeste = {
                                        identificacaoConsulta: consultaInfos[i].identificacaoConsulta,
                                        filtros: []
                                    };
                                    $scope.obterDadosDashboard(modelTeste, consultaInfos[i], dashboard);
                                }
                            });
                    });
            }
            $scope.obterDadosDashboard = function (modelTeste, consultaInfos, dashboard) {
                PainelService.ObterDadosDashboards(modelTeste)
                    .then(function (response) {
                        $scope.dashboardDados = response.data;
                        var dashboardDados = {};
                        dashboardDados[consultaInfos.nomeDataSet] = $scope.dashboardDados;
                        var dataSet = new Stimulsoft.System.Data.DataSet(consultaInfos.nomeDataSet);
                        dataSet.readJson(dashboardDados);
                        viewer.report = dashboard;
                        dashboard.dictionary.databases.clear();
                        dashboard.regData(consultaInfos.nomeDataSet, consultaInfos.nomeDataSet, dataSet);
                        dashboard.dictionary.synchronize();
                    });
            }
            $scope.createViewer = function () {
                var options = new Stimulsoft.Viewer.StiViewerOptions();
                options.height = "100%";
                options.appearance.scrollbarsMode = true;
                options.toolbar.showDesignButton = true;
                // Create an instance of the viewer
                viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
                viewer.renderHtml("stiRightPanel");
            }(*I'm Brazilian, so what's in Portuguese are just variable and method names)