Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Error on running pyGetAllAttachments report definition

SA-55390

Summary



Error on running the pyGetAllAttachments report definition after saving it in the application layer.


Error Messages



** 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 120664 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)
.
DatabaseException caused by prior exception: com.microsoft.sqlserver.jdbc.SQLServerException: 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 120664 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)
.
| SQL Code: 6522 | SQL State: S0001



Steps to Reproduce

  1. Add an attachment
  2. Store the attachment the Data-Work-AttachFile
  3. Add pyAttachStream to the columns to retrieve
  4. Run the pyGetAllAttachments report definition by providing the .pxLinkedRefFrom" key. The error occurs


Root Cause



Microsoft SQL does not support unoptimized properties that are more than 2k bytes in a report definition.


Resolution

Perform any of the following local-change:

Use Obj-Open method as the size of pyAttachStream is large.



 

Published July 23, 2018 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us