processCalculatedColumnsAsync crash

Stimulsoft Reports.JS discussion
Post Reply
todea.df@gmail.com
Posts: 19
Joined: Tue Sep 01, 2020 8:45 am

processCalculatedColumnsAsync crash

Post by todea.df@gmail.com »

Hello,

I have a template with:
- a Datasource A of type CSV
- a Data Transformation B that is based on A
In my use case, in some cases, there is no data for A available, so the resource for A is empty.
But when generating the report, I get the following crash:

Code: Select all

TypeError: Cannot read properties of undefined (reading 'columns')
    at main\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:38:36385
    at Y.forEach (<anonymous>)
    at $w.processCalculatedColumnsAsync 
(main\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:38:36372)
    at $w.getDataTable2 (main\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:38:35781)
    at async $w.fetch (main\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:38:33775)
    at async _.C.StiDataAnalyzer.analyze 
(main\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:37:241214)
    at async nT.retrieveDataTable (main\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:45:57792)
    at async nT.connectToData (main\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:45:58021)
    at async Timeout._onTimeout (main\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:48:197151)
So there is a problem when computing B if data for A is empty.
It used to work in 2021.1.1.

I am using stimulsoft-reports-js 2024.4.5 right now, but the same behavior is present in latest 2025.3.1.

What should I use for A to mark that no data is available in order to avoid the crash but at the same time to be able to hide the tables that are based on A?

Thanks,
Darius
Post Reply