I frequently get an RTF format error when getting Order.Title.Commitment[0].CurrentOwner., and pushing it to standard windows RichTextBox control, stating it is not a proper RTF format.
When I look at the value of this property, it has all the expected RTF markup.
The control I'm pushing to is a standard .NET RichTextBox.
We are not currently updating this property via the API any where.
This field gets populated by a formula and sometimes directly by the user in the UI.
Is this a bug, and/or is there a way to pull out the raw text without the RTF markup reliably?
RTF Format Error
Re: RTF Format Error
Can you provide the exact RTF, so we can investigate?
Thanks!
Pradeepa.
Thanks!
Pradeepa.
Pradeepa Chandramohan
Software Engineer
SoftPro
Software Engineer
SoftPro
Re: RTF Format Error
Here ya go.
{\rtf1\ansi\ansicpg1252\uc1\deff1{\fonttbl
{\f0\fnil\fcharset0\fprq2 Arial;}
{\f1\fswiss\fcharset0\fprq2 Calibri;}
{\f2\fswiss\fcharset0\fprq2 Microsoft Sans Serif;}
{\f3\froman\fcharset2\fprq2 Symbol;}}
{\colortbl;\red0\green0\blue0;\red255\green255\blue255;\red220\green20\blue60;}
{\stylesheet{\s0\itap0\widctlpar\sa200\sl276\slmult1\f1\fs22 Normal;}{\*\cs10\additive Default Paragraph Font;}{\s16\itap0\nowidctlpar\f0\fs24 [Normal];}}
{\*\generator TX_RTF32 16.0.534.502;}
\deftab1134\paperw12240\paperh15840\margl1440\margt1440\margr1440\margb1440\widowctrl\formshade\sectd
\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn1440\margtsxn1440\margrsxn1440\margbsxn1440\pard\s16\itap0\nowidctlpar\plain\f2\fs17\cf3 CUSTOMER INFO}
Re: RTF Format Error
Thank you! We will investigate this issue and get back to you in a few days.
Pradeepa Chandramohan
Software Engineer
SoftPro
Software Engineer
SoftPro
-
- Posts: 1377
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: RTF Format Error
I see no error when inserting your RTF text into a Windows RichTextBox. When I do so, it displays "CUSTOMER INFO" in red. If I copy the text to a file and change its file extension to "rtf", it will display properly in Word and WordPad. Select seems to be performing as expected.
Code: Select all
this.richTextBox1.ResetText();
this.richTextBox1.Rtf = tbInput.Text; // Text from UI text box.
Bob Richards, Senior Software Developer, SoftPro
Re: RTF Format Error
Good news is you were still able to help me!
I didn't realize how critical calling ResetText() on the control was before setting it (even when being set for the first time) - adding that line seems to have fixed the issue reliably.
Thanks!
I didn't realize how critical calling ResetText() on the control was before setting it (even when being set for the first time) - adding that line seems to have fixed the issue reliably.
Thanks!