Request for Automated Solution to Update Variable Expression in Reports

Stimulsoft Reports.JAVA discussion
Post Reply
TecnologiaMV
Posts: 77
Joined: Mon May 30, 2022 7:35 pm

Request for Automated Solution to Update Variable Expression in Reports

Post by TecnologiaMV »

Dear,

I would like to know if there is any migrator or script available to adjust the expression of the variable list directly in the database or through another automated method, without the need to manually update each report.

Additionally, we are planning to upgrade our version to the latest one available on the market, but this issue may impact the process.

Problem Context: Some of our databases are still using version 2021.4.4, where the variable expression follows this format: PASTA.Count() == 0 ? "0" : PASTA.ToQueryString("")

In versions 2023.1.0 and above, this structure was changed to: "Count without brackets: PASTA.Count() -> PASTA.Count"

Currently, we have between 2,000 and 5,000 reports with this expression, making manual adjustments unfeasible. Given this, I would like to know if there is any automated solution, such as a migrator or SQL script, that can be executed to fix this issue in bulk.

Best regards,
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Request for Automated Solution to Update Variable Expression in Reports

Post by Lech Kulikowski »

Hello,

You can get reports, get all queries from the dictionary:
((StiSqlSource)report.Dictionary.DataSources[ "DataSourceName"]).SqlCommand = "command";
and check the query on the ".Count()" string

Thank you.
TecnologiaMV
Posts: 77
Joined: Mon May 30, 2022 7:35 pm

Re: Request for Automated Solution to Update Variable Expression in Reports

Post by TecnologiaMV »

**Dear,**

With the update to version **2023.1.0 and higher**, there was a change in the count structure, changing from:

🔹 **Old format:** `FOLDER.Count()`
🔹 **New format:** `FOLDER.Count`

This change requires manual adjustments to reports, impacting production environments, as reports are unavailable until the corrections are applied, which can lead to interruptions in customer processes.

Given this, we would like to know if there is **any alternative** to minimize this impact, such as:

✅ An **automatic migrator** that converts the old format to the new one.
✅ Some **bulk correction function** to make adaptation easier.
✅ Any other resource that allows you to make this adjustment with **minimum unavailability** in the environments.

I await your feedback on possible solutions.
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Request for Automated Solution to Update Variable Expression in Reports

Post by Lech Kulikowski »

Hello,

Please send us your request with a detailed description on support@stimulsoft.com.

Thank you.
Post Reply