Sharepoint List to PDF report

倖福魔咒の 提交于 2019-12-08 22:11:24

问题


I have a SharePoint list and I need to transform it into a document (any type) and export it to PDF. Would you have any tips on the best way to do this? I have Crystal Reports but not sure if this is the correct use case for this.


回答1:


You can programatically access the document library using the object model or via web services.

If you use the object model. You can use the SPContext object to get the current site/list. From there, you can iterate through the items or, you can use a method on the SPList object to turn it into a dataset which you could then use to generate a PDF using some kind of PDF library (e.g. PDF4NET). If you go this route the best way to roll it out is by packaging it up as a feature in a solution file (.WSP) which you can deploy to your farm. In this case the code would be running in the share point environment. You can get pretty fancy with this and have something like a "Print PDF" menu option in the action menu for all lists.

On the other hand, you could also access the list remotely using the web services. In such a case you could just use this as a data provider for your reporting package.




回答2:


The PDFsharepoint tool (http://www.pdfsharepoint.com) can be used to generate the PDF output. Nice thing about this tool is that you will "design" or "import" a template using WYSIWYG editor and only map the data. Without mess of coding your own PDF generator. It is not free tool though ...




回答3:


I have had much success using MS-Access for creating PDF reports from SharePoint lists. You can even embed the report as a view in the list. When you select the view, it opens Access for you. Plus you can join multiple lists and even other data from within access.

Access 2007 will save a report as a PDF or you can use a PDF printer adapter such as PDFCreator.




回答4:


The easiest way to export SharePoint list to pdf is, first export the list as Excel file. Then save the Excel file as Pdf document.




回答5:


There is a 3rd Party product that automates this. i-PMO's "SharePoint Data Miner" can be used to create a RS Report across any list data, then use the their SharePoint site Report Viewer and Document publisher to output the report as a PDF into a Document Library.



来源:https://stackoverflow.com/questions/1262717/sharepoint-list-to-pdf-report

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