問(wèn)題描述
你們中有人從事將 HTML 數(shù)據(jù)填充到水晶報(bào)表中的工作嗎?
Is anybody of you worked on HTML data populating into crystal reports?
我正在使用 Visual Studio 2010.我有一個(gè)來(lái)自 DB 的 XML 數(shù)據(jù).它能夠使用 XSL 轉(zhuǎn)換成 HTML.現(xiàn)在我的下一個(gè)任務(wù)是將它放入水晶報(bào)表中.
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.
任何提示都會(huì)很棒.因?yàn)樗性诰€(xiàn)資源都只是給我提供了與創(chuàng)建數(shù)據(jù)集和執(zhí)行存儲(chǔ)過(guò)程等相關(guān)的結(jié)果.
Any hint will be greatful. Because all the online resources are simply giving me results related to creating dataset and executing stored procedures etc.
我能夠?qū)⑽业?HTML 內(nèi)容提取到水晶報(bào)表中.現(xiàn)在嵌入式樣式無(wú)法應(yīng)用.我需要調(diào)整的任何線(xiàn)索?
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?
提前致謝.
問(wèn)候,帕萬(wàn)N
推薦答案
終于找到了一個(gè)突破口,在性能和內(nèi)容質(zhì)量上都非常完美.
Finally at last i found a breakthough and its very perfect in performance and quality of content.
首先無(wú)論我想要什么內(nèi)容,我都會(huì)準(zhǔn)備一個(gè)html字符串和
First whatever the content i want to , i will prepare a html string and
要獲取 PDF,請(qǐng)使用 WKHTMLTOPDF.exe要使用 HTML 準(zhǔn)備圖像,請(qǐng)使用 WKHTMLTOIMAGE.exe 和我在 byte[] 中創(chuàng)建的相同圖像并添加新的水晶報(bào)告.
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.
然后 byte[] 將被輸入到水晶報(bào)表中的控件.
Then the byte[] will be feeded to the control dropped into crystal report.
而且效果很好.不需要 itextsharp 或任何其他第三方命令工具來(lái)打印圖像、打印 pdf 和打印 html.我現(xiàn)在正在使用帶有圖像的水晶報(bào)表來(lái)做所有事情.
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.
謝謝大家.
問(wèn)候,帕萬(wàn)N
這篇關(guān)于具有 HTML 內(nèi)容格式的水晶報(bào)表的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!