Error when setting license

Stimulsoft Reports.JS discussion
Post Reply
anli
Posts: 13
Joined: Wed May 03, 2017 12:49 pm

Error when setting license

Post by anli »

Hello,

when I try to set my license in my Vue Typescript project I get

Code: Select all

stimulsoft.reports.js:28 Uncaught (in promise) TypeError: Cannot assign to read only property 'check' of object '[object Array]'
    at E5.loadFromString (stimulsoft.reports.js:28:242304)
    at E5.decryptFromString (stimulsoft.reports.js:28:243626)
    at Function.get2 (stimulsoft.reports.js:28:243988)
    at Function.BDIqV (stimulsoft.reports.js:28:244298)
    at Function.set key [as key] (stimulsoft.reports.js:28:244091)
    at Function.loadFromString (stimulsoft.reports.js:28:244924)
    at Reportdesigner.vue:18:30
    at callWithErrorHandling (runtime-core.esm-bundler.js:155:22)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:164:21)
    at Array.hook.__weh.hook.__weh (runtime-core.esm-bundler.js:2685:29)
    at flushPostFlushCbs (runtime-core.esm-bundler.js:356:32)
    at flushJobs (runtime-core.esm-bundler.js:401:9)
This is my code

Code: Select all

<template>
  <div id="designer"></div>
</template>

<script setup lang="ts">

import { onMounted } from 'vue'
import { Stimulsoft } from 'stimulsoft-reports-js/Scripts/stimulsoft.blockly.editor'
import 'stimulsoft-reports-js/Css/stimulsoft.designer.office2013.whiteblue.css'
import 'stimulsoft-reports-js/Css/stimulsoft.viewer.office2013.whiteblue.css'

onMounted(() => {
  console.log('Loading Designer view')

  console.log('Set full screen mode for the designer')
  var options = new Stimulsoft.Designer.StiDesignerOptions()

  Stimulsoft.Base.StiLicense.loadFromString('6vJ...U=')
  options.appearance.fullScreenMode = false

  var dataSet = new Stimulsoft.System.Data.DataSet('Cleanings')

  dataSet.readJson({
    cleanings: [{
      id: 1
    }, {
      id: 2
    }
    ]
  })

  console.log('Create the report designer with specified options')
  var designer = new Stimulsoft.Designer.StiDesigner(options, 'StiDesigner', false)
  console.log('Create a new report instance')
  var report = new Stimulsoft.Report.StiReport()
  report.reportName = 'MyNewReport'

  report.regData(dataSet.dataSetName, '', dataSet)
  report.dictionary.synchronize()


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

  console.log('Edit report template in the designer')
  designer.report = report
  console.log('Rendering the designer to selected element')
  designer.renderHtml('designer')

  console.log('Loading completed successfully!')
})
</script>
I'm using Stimulsoft Reports 2022.4.4. What am i doing wrong? Thanks for your help in advance!
Best regards, André
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Error when setting license

Post by Lech Kulikowski »

Hello,

Please send us a sample project that reproduces the issue for analysis on support@stimulsoft.com

Thank you.
Post Reply