RTF in DBText occasionally shows font name
Hello!
We've been having issues with RTF text in the DBText controls. Sometimes
the RTF text is displayed with the font name. We think it might be linked
to the font name having more than one space. Here are some examples of RTF
text that is displayed correctly and incorrectly.
CORRECT:
'{\rtf1\ansi\ansicpg1252\deff0\deflang1033\fs16{\fonttbl{\f0\fswissfswiss\fprq2\fcharset0
MS Sans Serif;}
{\f2\fnil\fcharset0 Helvetica;}
{\f3\fnil\fcharset0 Helvetica;}
{\f4\fnil\fcharset0 Times New Roman;}
{\f99\froman\fcharset0\fprq2{\*\panose 02020603050405020304}MS Sans
Serif;}{\f100\fnil\fcharset2 Symbol;}{\f101\fnil\fcharset2
Wingdings;}{\f102\fcharset204{\*\fname Courier New;}Courier New
CYR;}{\f103\fcharset0 MS Sans Serif;}{\f104\fcharset0 Courier New;}}
{\colortbl
;\red0\green0\blue0;\red0\green0\blue255;\red0\green0\blue0;\red0\green0\blue0;}
{\stylesheet {\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}{\s4 heading
4;}{\s5 heading 5;}{\s6 heading 6;}}
{\info{\doccomm Created by the HTML-to-RTF Pro DLL .Net 4.8.9.21}}
\paperw12241\paperh15841\margl567\margr567\margt283\margb567\viewkind1\viewscale100\viewzk2
\pard\fs16\lang1033\f3\fs16\cf3\ql\sb75\sa75 Condition is not to be
mentioned to Lauren except by personal tutor - tested again.
\par
}'
CORRECT:
'{\rtf1\ansi\ansicpg1252\deff0\deflang1033\fs16{\fonttbl{\f0\fswissfswiss\fprq2\fcharset0
MS Sans Serif;}
{\f2\fnil\fcharset0 TimesNewRoman;}
{\f3\fnil\fcharset0 Helvetica;}
{\f4\fnil\fcharset0 Helvetica;}
{\f99\froman\fcharset0\fprq2{\*\panose 02020603050405020304}MS Sans
Serif;}{\f100\fnil\fcharset2 Symbol;}{\f101\fnil\fcharset2
Wingdings;}{\f102\fcharset204{\*\fname Courier New;}Courier New
CYR;}{\f103\fcharset0 MS Sans Serif;}{\f104\fcharset0 Courier New;}}
{\colortbl
;\red0\green0\blue0;\red0\green0\blue255;\red0\green0\blue0;\red0\green0\blue0;}
{\stylesheet {\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}{\s4 heading
4;}{\s5 heading 5;}{\s6 heading 6;}}
{\info{\doccomm Created by the HTML-to-RTF Pro DLL .Net 4.8.9.21}}
\paperw12241\paperh15841\margl567\margr567\margt283\margb567\viewkind1\viewscale100\viewzk2
\pard\fs16\lang1033\f3\fs16\cf3\ql\sb75\sa75 Condition is not to be
mentioned to Lauren except by personal tutor - tested again.
\par
}'
CORRECT:
'{\rtf1\ansi\ansicpg1252\deff0\deflang1033\fs16{\fonttbl{\f0\fswissfswiss\fprq2\fcharset0
MS Sans Serif;}
{\f2\fnil\fcharset0 TimesNew Roman;}
{\f3\fnil\fcharset0 Helvetica;}
{\f4\fnil\fcharset0 Helvetica;}
{\f99\froman\fcharset0\fprq2{\*\panose 02020603050405020304}MS Sans
Serif;}{\f100\fnil\fcharset2 Symbol;}{\f101\fnil\fcharset2
Wingdings;}{\f102\fcharset204{\*\fname Courier New;}Courier New
CYR;}{\f103\fcharset0 MS Sans Serif;}{\f104\fcharset0 Courier New;}}
{\colortbl
;\red0\green0\blue0;\red0\green0\blue255;\red0\green0\blue0;\red0\green0\blue0;}
{\stylesheet {\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}{\s4 heading
4;}{\s5 heading 5;}{\s6 heading 6;}}
{\info{\doccomm Created by the HTML-to-RTF Pro DLL .Net 4.8.9.21}}
\paperw12241\paperh15841\margl567\margr567\margt283\margb567\viewkind1\viewscale100\viewzk2
\pard\fs16\lang1033\f3\fs16\cf3\ql\sb75\sa75 Condition is not to be
mentioned to Lauren except by personal tutor - tested again.
\par
}'
INCORRECT:
'{\rtf1\ansi\ansicpg1252\deff0\deflang1033\fs16{\fonttbl{\f0\fswissfswiss\fprq2\fcharset0
MS Sans Serif;}
{\f2\fnil\fcharset0 Times New Roman;}
{\f3\fnil\fcharset0 Helvetica;}
{\f4\fnil\fcharset0 Helvetica;}
{\f99\froman\fcharset0\fprq2{\*\panose 02020603050405020304}MS Sans
Serif;}{\f100\fnil\fcharset2 Symbol;}{\f101\fnil\fcharset2
Wingdings;}{\f102\fcharset204{\*\fname Courier New;}Courier New
CYR;}{\f103\fcharset0 MS Sans Serif;}{\f104\fcharset0 Courier New;}}
{\colortbl
;\red0\green0\blue0;\red0\green0\blue255;\red0\green0\blue0;\red0\green0\blue0;}
{\stylesheet {\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}{\s4 heading
4;}{\s5 heading 5;}{\s6 heading 6;}}
{\info{\doccomm Created by the HTML-to-RTF Pro DLL .Net 4.8.9.21}}
\paperw12241\paperh15841\margl567\margr567\margt283\margb567\viewkind1\viewscale100\viewzk2
\pard\fs16\lang1033\f3\fs16\cf3\ql\sb75\sa75 Condition is not to be
mentioned to Lauren except by personal tutor - tested again.
\par
}'
We use Delphi 2009 and Report Builder 14.08. We'd appreciate any help as to
why Report Builder shows the font name occasionally when displaying the RTF
text through DBText.
Thanks,
Farran
We've been having issues with RTF text in the DBText controls. Sometimes
the RTF text is displayed with the font name. We think it might be linked
to the font name having more than one space. Here are some examples of RTF
text that is displayed correctly and incorrectly.
CORRECT:
'{\rtf1\ansi\ansicpg1252\deff0\deflang1033\fs16{\fonttbl{\f0\fswissfswiss\fprq2\fcharset0
MS Sans Serif;}
{\f2\fnil\fcharset0 Helvetica;}
{\f3\fnil\fcharset0 Helvetica;}
{\f4\fnil\fcharset0 Times New Roman;}
{\f99\froman\fcharset0\fprq2{\*\panose 02020603050405020304}MS Sans
Serif;}{\f100\fnil\fcharset2 Symbol;}{\f101\fnil\fcharset2
Wingdings;}{\f102\fcharset204{\*\fname Courier New;}Courier New
CYR;}{\f103\fcharset0 MS Sans Serif;}{\f104\fcharset0 Courier New;}}
{\colortbl
;\red0\green0\blue0;\red0\green0\blue255;\red0\green0\blue0;\red0\green0\blue0;}
{\stylesheet {\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}{\s4 heading
4;}{\s5 heading 5;}{\s6 heading 6;}}
{\info{\doccomm Created by the HTML-to-RTF Pro DLL .Net 4.8.9.21}}
\paperw12241\paperh15841\margl567\margr567\margt283\margb567\viewkind1\viewscale100\viewzk2
\pard\fs16\lang1033\f3\fs16\cf3\ql\sb75\sa75 Condition is not to be
mentioned to Lauren except by personal tutor - tested again.
\par
}'
CORRECT:
'{\rtf1\ansi\ansicpg1252\deff0\deflang1033\fs16{\fonttbl{\f0\fswissfswiss\fprq2\fcharset0
MS Sans Serif;}
{\f2\fnil\fcharset0 TimesNewRoman;}
{\f3\fnil\fcharset0 Helvetica;}
{\f4\fnil\fcharset0 Helvetica;}
{\f99\froman\fcharset0\fprq2{\*\panose 02020603050405020304}MS Sans
Serif;}{\f100\fnil\fcharset2 Symbol;}{\f101\fnil\fcharset2
Wingdings;}{\f102\fcharset204{\*\fname Courier New;}Courier New
CYR;}{\f103\fcharset0 MS Sans Serif;}{\f104\fcharset0 Courier New;}}
{\colortbl
;\red0\green0\blue0;\red0\green0\blue255;\red0\green0\blue0;\red0\green0\blue0;}
{\stylesheet {\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}{\s4 heading
4;}{\s5 heading 5;}{\s6 heading 6;}}
{\info{\doccomm Created by the HTML-to-RTF Pro DLL .Net 4.8.9.21}}
\paperw12241\paperh15841\margl567\margr567\margt283\margb567\viewkind1\viewscale100\viewzk2
\pard\fs16\lang1033\f3\fs16\cf3\ql\sb75\sa75 Condition is not to be
mentioned to Lauren except by personal tutor - tested again.
\par
}'
CORRECT:
'{\rtf1\ansi\ansicpg1252\deff0\deflang1033\fs16{\fonttbl{\f0\fswissfswiss\fprq2\fcharset0
MS Sans Serif;}
{\f2\fnil\fcharset0 TimesNew Roman;}
{\f3\fnil\fcharset0 Helvetica;}
{\f4\fnil\fcharset0 Helvetica;}
{\f99\froman\fcharset0\fprq2{\*\panose 02020603050405020304}MS Sans
Serif;}{\f100\fnil\fcharset2 Symbol;}{\f101\fnil\fcharset2
Wingdings;}{\f102\fcharset204{\*\fname Courier New;}Courier New
CYR;}{\f103\fcharset0 MS Sans Serif;}{\f104\fcharset0 Courier New;}}
{\colortbl
;\red0\green0\blue0;\red0\green0\blue255;\red0\green0\blue0;\red0\green0\blue0;}
{\stylesheet {\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}{\s4 heading
4;}{\s5 heading 5;}{\s6 heading 6;}}
{\info{\doccomm Created by the HTML-to-RTF Pro DLL .Net 4.8.9.21}}
\paperw12241\paperh15841\margl567\margr567\margt283\margb567\viewkind1\viewscale100\viewzk2
\pard\fs16\lang1033\f3\fs16\cf3\ql\sb75\sa75 Condition is not to be
mentioned to Lauren except by personal tutor - tested again.
\par
}'
INCORRECT:
'{\rtf1\ansi\ansicpg1252\deff0\deflang1033\fs16{\fonttbl{\f0\fswissfswiss\fprq2\fcharset0
MS Sans Serif;}
{\f2\fnil\fcharset0 Times New Roman;}
{\f3\fnil\fcharset0 Helvetica;}
{\f4\fnil\fcharset0 Helvetica;}
{\f99\froman\fcharset0\fprq2{\*\panose 02020603050405020304}MS Sans
Serif;}{\f100\fnil\fcharset2 Symbol;}{\f101\fnil\fcharset2
Wingdings;}{\f102\fcharset204{\*\fname Courier New;}Courier New
CYR;}{\f103\fcharset0 MS Sans Serif;}{\f104\fcharset0 Courier New;}}
{\colortbl
;\red0\green0\blue0;\red0\green0\blue255;\red0\green0\blue0;\red0\green0\blue0;}
{\stylesheet {\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}{\s4 heading
4;}{\s5 heading 5;}{\s6 heading 6;}}
{\info{\doccomm Created by the HTML-to-RTF Pro DLL .Net 4.8.9.21}}
\paperw12241\paperh15841\margl567\margr567\margt283\margb567\viewkind1\viewscale100\viewzk2
\pard\fs16\lang1033\f3\fs16\cf3\ql\sb75\sa75 Condition is not to be
mentioned to Lauren except by personal tutor - tested again.
\par
}'
We use Delphi 2009 and Report Builder 14.08. We'd appreciate any help as to
why Report Builder shows the font name occasionally when displaying the RTF
text through DBText.
Thanks,
Farran
This discussion has been closed.
Comments
I'm a bit unclear about what you are trying to accomplish. Are you
displaying RTF source in your report? Where is the RTF source coming from?
Note that a DBText object will simply display the text it is given. Are
you using a DBRichText component by chance?
I'm also unable to see offhand how the correct and incorrect RTF is
different. The top one appears to only have the fonts in a different
order which should not affect the output.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com