Question
CI
IN
Last activity: 25 Apr 2023 23:18 EDT
In UAT i facing one issue on Report, I got the below while run the report.
Hi Guys ,
While run the report i getting this error .
There is 1 error
- An error occured on executing the query for the report definition - There was a problem getting a list: code: 245 SQLState: S0001 Message: Conversion failed when converting the varchar value '219.45' to data type int.
- DatabaseException caused by prior exception: com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting the varchar value '219.45' to data type int.
- | SQL Code: 245 | SQL State: S0001
How to resolve this issue
Please help me out
***Edited by Moderator Marije to change type from Pega Academy to Product***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
NCS Pte. Ltd
SG
Hi @kirti: Please verify the Database table column type and PEGA property type between the environments. In this case I feel you have a varchar column in DB and the respective property is created as Integer. In this case, it wont work. In dev it might worked because you don't have similar data.
Thanks.
Updated: 25 Apr 2023 6:02 EDT
CI
IN
Actually, varchar column in UAT DB, but Property Type I created as Text
NCS Pte. Ltd
SG
Hi @kirti: Thanks for the info. If the property is Text and the column is Varchar, there shouldn't be any issue. Please make sure you are not using any functions in the report to convert text to integer. If there are no such functions and if you are still facing the issue, try to save the class and DB table instance and run the report.
Thanks
CI
IN
I used one function Alias for
ZeroIfNullText I used the property Activity Tax only. Any way the property is text.
NCS Pte. Ltd
SG
Hi @kirti: I don't see any OOTB functions as ZeroIfNullText. Can you check if this is a custom function created in application layer? If so, have you tried removing the function and adding the column directly in report. If this works, then the issue is in the function. Thanks.
CI
IN
I have created for this function Alias in that i put everything as text datatype , return Type and category
NCS Pte. Ltd
SG
Hi @kirti: Were you able to isolate the problem by removing the function? This will help to understand if the issue is with the function (or) in other area.
Thanks.
CI
IN
Yes, i deleted that function alias in report definition, rest of column are coming, but i need that column as well.
Actually
When {1} is null return 0 else return input
This is condition i used
CASE WHEN {1} IS NOT NULL THEN {1} ELSE 0 END
Why it's coming error in report definition.
Please help me on that
NCS Pte. Ltd
SG
Hi @kirti I hope you have Input parameter data type and return type as Text in the function. In this case, can you try to update the source as below.
CASE WHEN {1} IS NOT NULL THEN {1} ELSE '0' END
Thanks.