問題描述
你們中有人從事將 HTML 數據填充到水晶報表中的工作嗎?
Is anybody of you worked on HTML data populating into crystal reports?
我正在使用 Visual Studio 2010.我有一個來自 DB 的 XML 數據.它能夠使用 XSL 轉換成 HTML.現在我的下一個任務是將它放入水晶報表中.
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.
我能夠將我的 HTML 內容提取到水晶報表中.現在嵌入式樣式無法應用.我需要調整的任何線索?
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?
提前致謝.
問候,帕萬N
推薦答案
終于找到了一個突破口,在性能和內容質量上都非常完美.
Finally at last i found a breakthough and its very perfect in performance and quality of content.
首先無論我想要什么內容,我都會準備一個html字符串和
First whatever the content i want to , i will prepare a html string and
要獲取 PDF,請使用 WKHTMLTOPDF.exe要使用 HTML 準備圖像,請使用 WKHTMLTOIMAGE.exe 和我在 byte[] 中創建的相同圖像并添加新的水晶報告.
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[] 將被輸入到水晶報表中的控件.
Then the byte[] will be feeded to the control dropped into crystal report.
而且效果很好.不需要 itextsharp 或任何其他第三方命令工具來打印圖像、打印 pdf 和打印 html.我現在正在使用帶有圖像的水晶報表來做所有事情.
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.
謝謝大家.
問候,帕萬N
這篇關于具有 HTML 內容格式的水晶報表的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!