Designer not working.

Stimulsoft Reports.JS discussion
Post Reply
lucas.decol
Posts: 1
Joined: Sat Jun 18, 2016 3:01 pm

Designer not working.

Post by lucas.decol »

Hello everyone I'm Starting to use Stimulsoft however I'm having trouble What I believe is not working for something I did wrong in the angular part however I am not identify , Can anyone help me ? Thank you very much in advance !

designer.html:

Code: Select all

<body ng-controller="DesignerController">
    <div id="designer"></div>
</body>
designer.controller.js

Code: Select all

(function() {
    'use strict';

    angular
        .module('tccApp')
        .controller('DesignerController', DesignerController);

    DesignerController.$inject = ['$scope', '$rootScope', '$window', '$stateParams', 'entity', 'PlanoEstagio', 'Aluno', 'Empresa', 'Banca', 'CronogramaRelatorio'];

    function DesignerController($scope, $rootScope, $window, $stateParams, entity, PlanoEstagio, Aluno, Empresa, Banca, CronogramaRelatorio) {
        var vm = this;
        init();
        function init(){
            console.log('Loading Designer view');

            console.log('Set full screen mode for the designer');
            var options = new $window.Stimulsoft.Designer.StiDesignerOptions();
            options.appearance.fullScreenMode = false;

            console.log('Create the report designer with specified options');
            var designer = new $window.Stimulsoft.Designer.StiDesigner(options, 'StiDesigner', false);

            console.log('Create a new report instance');
            var report = new $window.Stimulsoft.Report.StiReport();

            console.log('Load report from url');
            report.loadFile('/reports/SimpleList.mrt');

            console.log('Edit report template in the designer');
            designer.report = report;

            console.log('Rendering the viewer to selected element');
            console.log(document.getElementsByName('designer'));
            designer.renderHtml(document.getElementsByName('designer'));
            console.log(document.getElementsByName('designer'));

            console.log('Loading completed successfully!');
        }
    }
})();
designer.state.js

Code: Select all

(function() {
    'use strict';

    angular
        .module('tccApp')
        .config(stateConfig);

    stateConfig.$inject = ['$stateProvider'];

    function stateConfig($stateProvider) {
        $stateProvider.state('plano-estagio.designer', {
            parent: 'plano-estagio',
            url: '/{id}/designer',
            data: {
                authorities: ['ROLE_USER']
            },
            onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {
                $uibModal.open({
                    templateUrl: 'app/entities/plano-estagio/designer.html',
                    controller: 'DesignerController',
                    controllerAs: 'vm',
                    backdrop: 'static',
                    size: 'lg',
                    resolve: {
                        entity: ['PlanoEstagio', function(PlanoEstagio) {
                            return PlanoEstagio.get({id : $stateParams.id}).$promise;
                        }]
                    }
                }).result.then(function() {
                    console.log("1");
                    $state.go('plano-estagio', null, { reload: true });
                }, function() {
                    console.log("2");
                    $state.go('^');
                });
            }]
        });
}

})();

HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Designer not working.

Post by HighAley »

Hello.

Sorry, but we don't support Angular at this moment.

Thank you.
Post Reply