Generating reports using custom data (html table) not dataset

本秂侑毒 提交于 2019-12-25 14:47:19

问题


I read several articles on this site and many others recommending report generating tools of various kinds but all use dataset as there datasource.

This is not my requirement!

I need some way to export the data which is displayed in the htmltable on mypage.aspx.

  • user clicks view record
  • a pdf opens (it should contain the data of the html table which is made dynamically)

I want to generate a pdf on the fly using a htmltable as a source of data and displaying it a a pdf doc in the browser but not having to save the result to the webserver.


回答1:


You may take a look at iTextSharp and here's a tutorial on how to get started. There's also a section in the documentation which illustrates how to create tables in PDF documents.




回答2:


Check out this thread regarding abcPDF. What you are describing is very similar to what I have used their library for. When I was originally testing out various methods, I had tried iTextSharp but found for the very minimal cost, abcPDF did everything that I required (sepcifically HTML to PDF generation) with minimal lines of code.

Generation PDF from HTML (component for .NET)



来源:https://stackoverflow.com/questions/3591322/generating-reports-using-custom-data-html-table-not-dataset

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