Problems with RTF format on Windows 98

Hello, I use TfrRichView in m reports and on Win XP it works fine, but on Win 98. The richtext appears as plain with rtf tags. For exampe:

{\rtf1\ansi\ansicpg1251\deff0\deflang3098{\fonttbl{\f0\fswiss\fprq2\fcharset204 Verdana;}{\f1\fswiss\fcharset204{\*\fname Verdana;}Verdana ;}}{\colortbl ;\red0\green0\blue255;}\viewkind4\uc1\pard\lang1026\f0\qj\fs16\par Според \b \ul Васил Иванов\ulnone \b0 -\b \ul Лучано\ulnone \b0 трябва да се изчака краят на разследването на Комисията по етика към МОК и тогава да се дават оценки по корупционния скандал.\lang1026\f1}

istead of:
Според Васил Иванов-Лучано трябва да се изчака краят на разследването на Комисията по етика към МОК и тогава да се дават оценки по корупционния скандал

I want to ask if that is a known problem and is there a way to fix it.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 2:23AM
    What was the rtf produced from originally? program and system please.
    the only time i have seen this is if for some reason the text only property of the memo is set to true.
    ;)
  • edited 2:23AM
    The text only property is set to false.

    I use my own algorithm to insert rtf tags I need. After that I set the richedit.text property to the prepared text:


    rtfString := GetRichEditString(string);
    view := frReport.FindObject('MemoAddInfo');
    TfrRichView(view).RichEdit.Text := rtfString;

    In GetRichEditString(aString) I do the following

    begin
    Result := RTF_START + Format(RTF_FONTSIZE_TAG,[aFontSize]) + aString + RTF_END;
    end;

    //where using theese constants
    const RTF_START: String = '{\rtf1\ansi\ansicpg1251\deff0\deflang3098'+
    '{\fonttbl{\f0\fswiss\fprq2\fcharset204 Verdana;}'+
    '{\f1\fswiss\fcharset204{\*\fname Verdana;}Verdana ;}}'+
    '{\colortbl ;\red0\green0\blue255;}'+
    '\viewkind4\uc1\pard\lang1026\f0\qj';
    RTF_END: String = '\lang1026\f1} ';
    RTF_FONTSIZE_TAG: String = '\fs%d ';

    And on Win XP this works, but on Win 98 it doesn't.
  • theodoretheodore Greece
    edited 2:23AM
    Hi aleha...
    I had this problem too.
    To solve it you must use TfrRxRichView instead of TfrRichView
    To use (and have) this component you must unistall fast report, install rx lib ver >=2.60 (freeware can be found very easy), then goto fast report source, fr.inc and un-comment the {$DEFINE RX} line (rx rich edit 2)
    Recompile and install fastreport again and it works...
    Hope it helps...
  • edited 2:23AM
    Thanks, theodore.
    You realy saved my life. ;)

    Best Wishes,
    Alex
  • gordkgordk St.Catherines On. Canada.
    edited 2:23AM
    Thanx theodore
    The problem is the difference between delphis richedit upon which fr's richedit is based. it does not recognize the version differences in MS richedit dll versions
    where rx does.
    Alex if you are using d7 the updated rxlib is in the jvc stuff on the companion cd
    there is upgraded rxlib which can be used without having to install jvc and making any jvc changes.
    ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.