Crystal Reports 2008 支持哪些 HTML 标签

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12791321/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 03:14:21  来源:igfitidea点击:

What HTML tags are supported in Crystal Reports 2008

htmlcrystal-reportssapcrystal-reports-2008

提问by kentcdodds

I know by right clicking some text fields in Crystal Reports you can tell Crystal to render that report as HTML(See screenshots below). I'm wondering what the possible tags available in those fields is and what CSS/styling capabilities there are. Thanks!

我知道通过右键单击 Crystal Reports 中的一些文本字段,您可以告诉 Crystal 将该报告呈现为HTML(请参见下面的屏幕截图)。我想知道这些字段中可用的标签是什么以及有哪些 CSS/样式功能。谢谢!

Right Click text field

右键单击文本字段

Right click a field and select "Format Field"

右键单击一个字段并选择“格式字段”

Text Interpretation

文本解释

Click the Paragraph Tag and the Text Interpretation combo box.

单击段落标记和文本解释组合框。

回答by kentcdodds

I found this in a forum post. Not sure about it's validity, but it seems legit.

我在论坛帖子中找到了这个。不确定它的有效性,但它似乎是合法的。

It appears that Crystal Reports only supports a small subset of HTML tags and attributes.

Crystal Reports 似乎只支持一小部分 HTML 标记和属性。

The supported tags are:

支持的标签是:

  • 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
  • body
  • div(导致段落中断)
  • tr(仅导致分段;不保留表的列结构)
  • span
  • font
  • p(导致段落中断)
  • br(导致段落中断)
  • h1(导致分段,使字体加粗和两倍默认大小)
  • h2(导致段落中断,使字体加粗和默认大小的 1.5 倍)
  • h3(导致段落中断,使字体加粗和 9/8 默认大小)
  • h4(导致段落中断,使字体加粗)
  • h5(导致分段,使字体加粗和 5/6 默认大小)
  • h6(导致段落中断,使字体加粗和 5/8 默认大小)
  • center
  • big(字体大小增加 2 磅)
  • small(如果是 8 磅或更大,则将字体大小减小 2 磅)
  • b
  • i
  • s
  • strike
  • u

The supported attributes are:

支持的属性有:

  • align
  • face
  • size
  • color
  • style
  • font-family
  • font-size
  • font-style
  • font-weight
  • align
  • face
  • size
  • color
  • style
  • font-family
  • font-size
  • font-style
  • font-weight

Not sure about CSS. I'm pretty sure you can't do any styling beyond what you see here.

不确定CSS。我很确定你不能做任何超出你在这里看到的样式。