You cannot load a report with dashboards.

Обсуждение Stimulsoft Reports.JS
Ответить
ivan.tiran
Сообщения: 8
Зарегистрирован: 06 фев 2020, 14:57

You cannot load a report with dashboards.

Сообщение ivan.tiran »

Добрый день. Проблема при загрузке во viewer dashboards.

Ошибка в firefox.

Код: Выделить всё

You cannot load a report with dashboards.
stimulsoft.reports.js:45:102729
TypeError: t.pages.getByIndex(...) is undefined
[Подробнее]
stimulsoft.viewer.js:11:131047
Q</Q.prototype.renderHtml/this.jsObject.assignReport/<
http://localhost:3000/assets/stimulsoft/stimulsoft.viewer.js:11:131047
Q</Q.prototype.invokeLoadDocument/<
http://localhost:3000/assets/stimulsoft/stimulsoft.viewer.js:11:154321
unreachable code after return statement
[Подробнее]
stimulsoft.reports.js:8:133817
html

Код: Выделить всё

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="%PUBLIC_URL%/assets/stimulsoft/stimulsoft.viewer.office2013.whiteblue.css">
  <script src="%PUBLIC_URL%/assets/stimulsoft/stimulsoft.reports.js"></script>
  <script src="%PUBLIC_URL%/assets/stimulsoft/stimulsoft.viewer.js"></script>
  <title>Document</title>
</head>
<body>
  <div id="root"></div>
</body>
</html>
jsx

Код: Выделить всё

    componentDidMount(){
        //console.log('Loading Viewer view');

       // console.log('Creating the report viewer with default options');
        const viewer = new window.Stimulsoft.Viewer.StiViewer(null, 'StiViewer', false);

       // console.log('Creating a new report instance');
        const report = new window.Stimulsoft.Report.StiReport();

        //console.log('Load report from url');
        report.loadFile(this.props.reportUrl);


        //console.log('Assigning report to the viewer, the report will be built automatically after rendering the viewer');
        viewer.report = report;

               //console.log('Rendering the viewer to selected element');

               

        viewer.renderHtml('viewer');
        
  }
Google Chrome выдаёт, что метод isDashboard не может быть прочитан или не определён.

В чём проблема? Спасибо.
ivan.tiran
Сообщения: 8
Зарегистрирован: 06 фев 2020, 14:57

Re: You cannot load a report with dashboards.

Сообщение ivan.tiran »

Проблему решил добавлением stimulsoft.dasboards.js из nodemodules в index.html.
Aleksey
Сообщения: 2761
Зарегистрирован: 22 апр 2010, 06:57

Re: You cannot load a report with dashboards.

Сообщение Aleksey »

Здравствуйте,

Отлично!
Ответить