Skip to Content

PB12.5.1 Build 4595: Display rich text as string in datawindow


We had lost some functionality with displaying rich text data when we migrated from PB9.0 to PB11.5.1 in 2010.

In powerbuilder 9.0 we were able to display rich text data greater than 32766 in a datawindow which had a string variable defined as 32766.

In PB11.5 we were not able to display data greater than 32766 in the same kind of datawindow. The application crashed whenever the datalength exceeded 32766 characters as shown in the attached document.

Now we are migrating to pb12.5.1 and it's again crashing when the data length is greater than 32766. Our users want to gain back the original functionality of being able to see the full text in the report datawindow.

I have tried changing the settings for PBMaxTextSize to '200000000' in both the pbodb125.ini file and also within the code where we set SQLCA parameters for creating a database connection to no avail.

Please let me know of a solution.



PBDWError.PNG (196.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 09, 2013 at 06:09 AM

    So, you've probably left out a few key implementation details, but if your implementation is migrated forward from PB9, then it's likely you're bringing the data from the database in a DataWindow's SELECT statement, and populating it into a rich text control. (I did something similar back in the day.) Of course, as you've pointed out, when retrieving a data with a SELECT, you're limited to 32K (someone got lucky and leveraged a PB bug back in the PB9 implementation).

    PB 11.5 added a rich text column edit style, which allowed you to display rich text directly in a DataWindow UI layer, but of course it was limited to 32K.

    PB 12.5 adds the ability to use the rich text column edit style, but take it beyond the 32K limit. The following is what's in the "New Features" section of the help file:

    RTF and Images in the DataWindow Object

    PowerBuilder 12.5 introduces the RTF, Image, and XPS Database Blobs, as well as RichText and RichTextFile expression functions for Computed Fields.

    The RTF, Image, and XPS Database Blob feature is a port of the existing feature from PowerBuilder .NET.

    The RichText expression function takes as argument a string expression interpreted as RTF file and renders it as such. If the argument is not RTF, nothing renders.

    The RichTextFile takes as argument a string expression interpretation of the name of the RTF file and renders it as such. If the argument is not an RTF file, nothing renders.

    Implementing this will take some reworking of your DataWindows, particularly bringing your rich text control into the DataWindow UI layer, but it's probably the best route forward.

    Good luck,


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2013 at 12:19 PM

    Hi Raj;

    You have to remember that since PB 10 - PB is Unicode (double-byte) based. Thus, your 32K of text now becomes 64K unless you control the string manipulation using the ANSI! parameter on many of the PB methods.

    Since you have a reproducible problem - I would suggest logging this issue with SAP Technical Support and if possible provide them with a simple example.

    BTW: If you are on PB 12.5.1 then I assume you are using build # 4015?

    Regards ... Chris

    Add a comment
    10|10000 characters needed characters exceeded

    • Thank You Chris for the information.

      On further analysis, I found that PB9.00 also crashed with strings above 32766. It was the double byte storage that was causing the 32766 limit to be reached earlier in PB11.5/PB12.5 that was causing the crash.

      I will try to figure out a way to use the new features suggested by Terry to resolve this issue.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.