Crystal report with HTML content formatting

Pavan N picture Pavan N · Apr 5, 2012 · Viewed 11.3k times · Source

Is anybody of you worked on HTML data populating into crystal reports?

Am using Visual studio 2010. I had an XML data coming from DB. Which am able to convert into HTML using XSL. Now my next task is to get it into crystal report.

Any hint will be greatful. Because all the online resources are simply giving me results related to creating dataset and executing stored procedures etc.

I was able to pull my HTML content to crystal report. Now the embedded styling was not able to get applied. Any clues whr do i need to tweak?

Thanks in advance.

Regards, Pavan N

Answer

Lee Tickett picture Lee Tickett · Apr 5, 2012

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...