Skip to Content
0
Former Member
Mar 05, 2013 at 08:34 PM

Issue with rich text datawindows and rich text edit controls after migrating PB11 application to PB12.5

541 Views

Hello,


I have recently migrated a Powerbuilder 11.1 Build 8204 application to Powerbuilder 12.5 Build 2511 and have run into an issue with rich text edit controls and rich text edit datawindows after migration.

Previously we used a rich text edit control for printing reports with custom paper sizes and margins. We used the CopyRTF and PasteRTF functions to build the syntax for the rich text edit control to display and print the formatted data from the datawindow. This functionality worked great in Powerbuilder 11.

In PB12.5, the behaviour and formatting for the rich text edit controls seems to have changed. Our preview in PB12.5 no longer displays the data from the input fields from the datawindow. The borders and formatting still appear, just none of the data from the input fields.

Below is the data returned rtf data we are pasting into the rich text edit control:

POWERBUILDER 11:

{\rtf1\ansi\ansicpg1252\uc1\deff0{\fonttbl

{\f0\fswiss\fcharset0\fprq2 Arial;}

{\f1\fswiss\fcharset0\fprq2 Tahoma;}

{\f2\fnil\fcharset0\fprq2 IDAutomationC128M;}

{\f3\froman\fcharset2\fprq2 Symbol;}}

{\colortbl;\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue0;}

{\stylesheet{\s0\itap0\nowidctlpar\f0\fs24 [Normal];}{\*\cs10\additive Default Paragraph Font;}}

{\*\generator TX_RTF32 13.0.501.501;}

\deftab1134\paperw12240\paperh15840\margl0\margt0\margr0\margb0\widowctrl

{\*\background{\shp{\*\shpinst\shpleft0\shptop0\shpright0\shpbottom0\shpfhdr0\shpbxmargin\shpbxignore\shpbymargin\shpbyignore\shpwr0\shpwrk0\shpfblwtxt1\shplid1025{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fillColor}{\sv 16777215}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fBackground}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}}}\pard\itap0\nowidctlpar\qc\plain\f1\fs16\b\cf3{\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags152\txfielddata 7b004400450050004100520054004d0045004e0054005f0043004f00440045007d000000}{\*\txfieldtext }{\field\fldlock{\*\fldinst { MERGEFIELD \{DEPARTMENT_CODE\}}}{\fldrslt{}}}}\plain\f1\fs20\par\pard\itap0\nowidctlpar\plain\f1\fs28\b\cf3{\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags152\txfielddata 7b00530041004d0050004c0045005f004e0055004d004200450052007d000000}{\*\txfieldtext S1}{\field\fldlock{\*\fldinst { MERGEFIELD \{SAMPLE_NUMBER\}}}{\fldrslt{S1}}}}\plain\f1\fs20\par\pard\itap0\nowidctlpar\qc \plain\f2\fs28\cf3{\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags152\txfielddata 7b0043004f004d0050005500540045005f0031007d000000}{\*\txfieldtext \loch\f2\hich\f2\'ccS1v\'ce }{\field\fldlock{\*\fldinst { MERGEFIELD \{COMPUTE_1\}}}{\fldrslt{\loch\f2\hich\f2\'ccS1v\'ce }}}}\plain\f1\fs20\par\pard\itap0\nowidctlpar\plain\f1\fs16\b\cf3{\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags152\txfielddata 7b005300430041004e005f004400410054004500540049004d0045007d000000}{\*\txfieldtext }{\field\fldlock{\*\fldinst { MERGEFIELD \{SCAN_DATETIME\}}}{\fldrslt{}}}}\plain\f1\fs20\tab\plain\f1\fs16\b\cf3{\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags152\txfielddata 7b00500055004c0056004500520049005a0045005f005700450049004700480054007d000000}{\*\txfieldtext }{\field\fldlock{\*\fldinst { MERGEFIELD \{PULVERIZE_WEIGHT\}}}{\fldrslt{}}}}\plain\f1\fs20\par\pard\itap0\nowidctlpar}\par\pard\par

POWERBUILDER 12.5:

{\rtf1\ansi\ansicpg1252\uc1\deff1{\fonttbl

{\f0\fnil\fcharset0\fprq2 Arial;}

{\f1\fswiss\fcharset0\fprq2 Calibri;}

{\f2\froman\fcharset0\fprq2 Times New Roman;}

{\f3\fswiss\fcharset0\fprq2 MS Reference Sans Serif;}

{\f4\fswiss\fcharset0\fprq2 Microsoft Sans Serif;}

{\f5\fnil\fcharset0\fprq2 IDAutomationC128M;}

{\f6\fswiss\fcharset0\fprq2 Arial;}

{\f7\fswiss\fcharset0\fprq2 Tahoma;}

{\f8\froman\fcharset2\fprq2 Symbol;}}

{\colortbl;\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue0;}

{\stylesheet{\s0\itap0\widctlpar\sa200\sl276\slmult1\f1\fs22 Normal;}{\*\cs10\additive Default Paragraph Font;}{\s16\itap0\nowidctlpar\f0\fs24 [Normal];}}

{\*\generator TX_RTF32 15.0.530.503;}

\deftab1134\paperw12240\paperh15840\margl0\margt0\margr0\margb0\widowctrl\formshade\sectd

\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn0\margtsxn0\margrsxn0\margbsxn0\trowd\irow0\irowband0\lastrow\trgaph0\trrh170\trleft0\trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl10\trpaddr10\trpaddfl3\trpaddft3\trpaddfr3\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clftsWidth3\clwWidth720\cellx720\clvertalt\clpadt0\clpadft3\clpadr0\clpadfr3\clftsWidth3\clwWidth3466\cellx4186\pard\intbl\nowidctlpar\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\plain\f2\fs22\cell\pard\intbl\itap2\nowidctlpar\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\plain\f3\fs22\b\nestcell{\nonesttables\par}\pard\intbl\itap2\nowidctlpar{\*\nesttableprops\trowd\irow0\irowband0\trgaph10\trrh170\trleft0\trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddr10\trpaddfl3\trpaddft3\trpaddfr3\trpaddfb3\clvertalc\clbrdrt\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clftsWidth3\clwWidth3466\cellx3466\nestrow}{\nonesttables\par}\pard\intbl\itap2\nowidctlpar\qc\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\plain\f4\fs24\b\cf3{\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags128\txfielddata 7b00530041004d0050004c0045005f004e0055004d004200450052007d000000}{\*\txfieldtext S1{\*\txfieldend}}S1}\plain\f4\fs24\b\nestcell{\nonesttables\par}\pard\intbl\itap2\nowidctlpar{\*\nesttableprops\trowd\irow1\irowband1\lastrow\trgaph10\trrh440\trleft0\trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddr10\trpaddfl3\trpaddft3\trpaddfr3\trpaddfb3\clvertalb\clbrdrr\brdrs\brdrw10\clftsWidth3\clwWidth3466\cellx3466\nestrow}{\nonesttables\par}\pard\intbl\nowidctlpar\cell\row\trowd\irow0\irowband0\lastrow\trgaph10\trrh32\trleft0\trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl10\trpaddr10\trpaddfl3\trpaddft3\trpaddfr3\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clftsWidth3\clwWidth4186\cellx4186\pard\intbl\nowidctlpar\qc\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\plain\f5\fs28{\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags128\txfielddata 7b0042004100520043004f00440045007d000000}{\*\txfieldtext \loch\f5\hich\f5\'ccS1v\'ce {\*\txfieldend}}\loch\f5\hich\f5\'ccS1v\'ce }\plain\f2\fs28\cell\row\trowd\irow0\irowband0\lastrow\trgaph10\trrh80\trleft0\trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl10\trpaddr10\trpaddfl3\trpaddft3\trpaddfr3\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clftsWidth3\clwWidth2250\cellx2250\clvertalt\clbrdrr\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clftsWidth3\clwWidth1936\cellx4186\pard\intbl\nowidctlpar\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\plain\f6\fs16\b\cf3{\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags128\txfielddata 7b005300430041004e005f004400410054004500540049004d0045007d000000}{\*\txfieldtext {\*\txfieldend}}}\plain\f3\fs16\b\cell\pard\intbl\nowidctlpar\qr\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\plain\f4\fs16\b\cf3{\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags128\txfielddata 7b00500055004c0056004500520049005a0045005f005700450049004700480054007d000000}{\*\txfieldtext {\*\txfieldend}}}\plain\f3\fs16\b\cell\row\pard\s16\itap0\nowidctlpar}\par\pard\par

As you can see, the MERGEFIELD is identified in the PB11 rtf, however, it does not seem to exist in the PB12.5 rft. Any ideas on what has changed or what i would need to do to display rich text datawindow data within the rich text edit control in PB12.5?

Any help on this issue is greatly appreciated.

Thanks,

Karen