Crystal Report显示HTML文本,但子弹不显示.为什么?

前端之家收集整理的这篇文章主要介绍了Crystal Report显示HTML文本,但子弹不显示.为什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我从sql-Server nvarchar(3000)字段中获取数据,该字段格式为html,在Crystal Reports 11中显示它.数据被保存为项目符号,如果我将数据拉出并放入带有html扩展名的文本文件,它显示了项目符号.但是从Crystal,它没有.我得到新线,但没有子弹.

保存的字段如下所示:

<HTML><BODY><DIV STYLE="text-align:Left;font-family:Tahoma;font-style:normal;font-weight:normal;font-size:11;color:#000000;"><DIV><DIV><P><SPAN>This is a bulleted list</SPAN></P><UL><LI><P><SPAN>One</SPAN></P></LI><LI><P><SPAN>Two</SPAN></P></LI><LI><P><SPAN>Three</SPAN></P></LI></UL><P><SPAN /></P></DIV></DIV></DIV></BODY></HTML>

在Crystal中,它看起来像这样:

This is a bulleted list 
One 
Two 
Three

换句话说,没有子弹.为什么不?

解决方法

无论出于何种原因,Crystal Reports只支持HTML标记的子集.根据 this forum thread,子弹不是其中之一.

为了后人的缘故,这里是支持的HTML标签的声称列表:

html
body
div (causes a paragraph break)
tr (causes only a paragraph break; does not preserve column structure of a table)
span
font
p (causes a paragraph break)
br (causes a paragraph break)
h1 (causes a paragraph break,makes the font bold & twice default size)
h2 (causes a paragraph break,makes the font bold & 1.5 times default size)
h3 (causes a paragraph break,makes the font bold & 9/8 default size)
h4 (causes a paragraph break,makes the font bold)
h5 (causes a paragraph break,makes the font bold & 5/6 default size)
h6 (causes a paragraph break,makes the font bold & 5/8 default size)
center
big (increases font size by 2 points)
small (decreases font size by 2 points if it's 8 points or larger)
b
i
s
strike
u

猜你在找的HTML相关文章