Page 1 of 1

Request for Automated Solution to Update Variable Expression in Reports

Posted: Wed Feb 12, 2025 9:00 pm
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,

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

Posted: Wed Feb 12, 2025 11:58 pm
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.

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

Posted: Fri Feb 14, 2025 1:01 pm
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.

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

Posted: Fri Feb 14, 2025 8:25 pm
by Lech Kulikowski
Hello,

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

Thank you.