Question

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

Was it helpful?

Solution 2

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top