Crystal report with HTML content formatting

蹲街弑〆低调 提交于 2019-12-04 17:54:40

Are you pushing the HTML into a text object? Have you set the interpretation to HTML?

Note that there's a limit to the level of styling and HTML that crystal is actually capable of interpreting. I found this list:

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

The supported attributes are:

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

Here: http://forums.asp.net/t/1209306.aspx/1

Also- apparently the a tag has been added in CR 2008 SP3. There may be more...

Finally at last i found a breakthough and its very perfect in performance and quality of content.

First whatever the content i want to , i will prepare a html string and

To get a PDF use WKHTMLTOPDF.exe To prepare a image out of HTML use WKHTMLTOIMAGE.exe and the same image i created into a byte[] and added a new crystal report.

Then the byte[] will be feeded to the control dropped into crystal report.

and it worked perfectly. there is no need of itextsharp, or anything else thirdparty command tools to print a image, to print a pdf, to print a html. Am doing everything now with crystal report feeded with an image.

Thanks to all.

Regards, Pavan N

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!