Report Definition error in retreiving large string data
We have to run a report definition on a data class, in which one of the property stores a RTE of 5000 characters. When RD is run we get the error:
An error occured on executing the query for the report definition - There was a problem getting a list: code: 6522 SQLState: S0001 Message: A .NET Framework error occurred during execution of user-defined routine or aggregate "pr_read_from_stream": System.Data.SqlServer.TruncationException: Trying to convert return value or output parameter of size 5066 bytes to a T-SQL type with a smaller size limit of 2000 bytes. System.Data.SqlServer.TruncationException: at System.Data.SqlServer.Internal.CXVariantBase.StringToWSTR(String pstrValue, Int64 cbMaxLength, Int32 iOffset, EPadding ePad)
We are not sure, where this size is specified and if we can change it or how to handle this?
When we run an activity Obj-Open-by-handle, we are getting back the content for the property.
Behind the scene, when a report definition is using unoptimized properties, Pega uses the java function pr_read_from_stream to retrieve the value of a property in the blob. This is for performance reason.
You face limitation about this function.
When you open the item, the full blob is being read (no pr_read_from_stream used) hence it works fine.
Also, it could be considered to disable UDF (which disable the use of these java function in the database) but I advice against it as Pega is not tested without UDF and even I have seen recently developer facing issues trying it and having ultimately to optimize property or activate UDF.
Thanks for the explanation. But I am not able to make changes in Prod. So found a round about way to fix it. Removed the property that contains the long string and called it from the activity (obj-open-by-handle) to display it in the model dialog. But still I will look into it in dev, and try to make the changes. Thanks and appreciate your help.