Error Variable List - Library 2023.2.4

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

Error Variable List - Library 2023.2.4

Post by TecnologiaMV »

Dear Sirs, Good afternoon!

After validating the execution of a report with the Auxiliary variable of a List in the 2023.2.4 library, this error was displayed in both the Report Designer and the Report Executor.

This bug in version 2023.1.8 has been fixed as reported by you, but it occurs in version 2023.2.4 of the Stimulsoft library.

Attached is the report with a super simple query, the point itself is not the query, but the use of the Auxiliary variable of a List variable has been showing an error.

Yours truly,
Attachments
PARAMETRO_LISTA_v2022.mrt
(14.44 KiB) Downloaded 122 times
MicrosoftTeams-image (9).png
MicrosoftTeams-image (9).png (27.99 KiB) Viewed 7442 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Error Variable List - Library 2023.2.4

Post by Lech Kulikowski »

Hello,

Please check the following query:
SELECT * from produto
where cd_produto in {(PASTA.Count == 0 ? "(0)" : "(" + PASTA.ToQueryString() + ")")}
order by 1

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

Re: Error Variable List - Library 2023.2.4

Post by TecnologiaMV »

Good afternoon!

After validating the example sent, I tested it and it did not work. Both by inserting the query in the data source: (SELECT * from product where cd_product in {(PASTA.Count == 0 ? "(0)" : "(" + PASTA.ToQueryString() + ")")} order by 1), an error is displayed (Screenshot_1.png).

When entering only: (PASTA.Count == 0 ? "(0)" : "(" + PASTA.ToQueryString() + ")") in the auxiliary variable. Displaying the attached error (Screenshot_2.png).

What would be the correct way to use it, since we use it this way: (PASTA.Count() == 0) ? "0" : PASTA.ToQueryString(""), as an auxiliary variable. And by making a reference in the data source.

Remember that we use the Java version of Stimulsoft-Reports.

Sincerely,
Attachments
Screenshot_2.png
Screenshot_2.png (18.8 KiB) Viewed 7410 times
Screenshot_1.png
Screenshot_1.png (40.42 KiB) Viewed 7410 times
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Error Variable List - Library 2023.2.4

Post by Max Shamanov »

Hello,

Please check the attached report with some changes.


Thank you.
Attachments
PARAMETRO_LISTA_v2022Changed.mrt
(16.32 KiB) Downloaded 123 times
TecnologiaMV
Posts: 53
Joined: Mon May 30, 2022 7:35 pm

Re: Error Variable List - Library 2023.2.4

Post by TecnologiaMV »

Hello, good afternoon!

After analyzing the submitted report, it was observed that there was the addition of the expression: {(PASTA.Count == 0 ? "(0)" : "(" + PASTA.ToQueryString() + ")")}, in the data source. But in this example it did not work.

We used an auxiliary variable and inside we added the expression: (PASTA.Count() == 0) ? "0" : PASTA.ToQueryString(""), and referencing the auxiliary variable name in the data source. And with that you can use the list variable.

Is there some other way around the error?

Sincerely
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Error Variable List - Library 2023.2.4

Post by Lech Kulikowski »

Hello,

> we added the expression: (PASTA.Count() == 0) ? "0" : PASTA.ToQueryString(""),

Your expression is not correct. Please check our sample again.

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

Re: Error Variable List - Library 2023.2.4

Post by TecnologiaMV »

Lech

We performed more tests and found that, in some scenarios, the expression still has errors.

According to the attached video, it is possible to verify that the requested test worked correctly and the report was issued successfully.

However, when using the expression with an auxiliary variable as follows: (FOLDER.Count() == 0) ? "0" : FOLDER.ToQueryString(""), the system issues an error warning and in other scenarios the expression also shows an error.

It is important to highlight that this format is being widely used in several clients, and any change in this direction would have a significant impact for them.

We would like to better understand the situation in order to resolve the issue and proceed with the update.

Please check the attached video of the incident, which may help with the analysis.

We appreciate your cooperation.

Versão Stimulsoft Reports.JAVA 2023.2.8
Attachments
2023-07-31 16-42-09.mov
(3 MiB) Downloaded 113 times
2023-07-31 16-25-28.mov
(4.18 MiB) Downloaded 113 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Error Variable List - Library 2023.2.4

Post by Lech Kulikowski »

Hello,

Please do not use the RadOnly option for such variables.

> with an auxiliary variable as follows: (FOLDER.Count() == 0) ? "0" : FOLDER.ToQueryString("")

That expression is not correct, please do not use it.

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

Re: Error Variable List - Library 2023.2.4

Post by TecnologiaMV »

Lech

In JAVA version 2021.4.4 the functionality was working correctly, when we updated to java 2023.2.8 the functionality stopped working.

The attached video proves that the report in question was functional and as of 2023.2.8 it is no longer working, like other variables.
Attachments
2023-08-01 16-23-51.mov
(4.46 MiB) Downloaded 108 times
TecnologiaMV
Posts: 53
Joined: Mon May 30, 2022 7:35 pm

Re: Error Variable List - Library 2023.2.4

Post by TecnologiaMV »

Lech
Watching the video with the test as you requested to use it and with it in version 2023.2.8 it works but in 2021.4.4 it is broken.
Attachments
2023-08-01 16-48-57.mov
(2.71 MiB) Downloaded 106 times
Post Reply