1

I am making a web part which will gather data from some lists and database tables and present it in custom format. For e.g. there will be logo on top, with date on right side and then below it data will be shown such as:

No.    Name    Class    Type

I want this report to be generated in PDF on the fly. So basically there is a button on my web part clicking on which will generate this report in PDF. What's the best way to do that?

1
  • 1
    Perhaps you may try SSRS reports Commented Jan 1, 2014 at 7:13

2 Answers 2

3

as Nadeem Yousuf said,

I also generate report in SharePoint with SSRS approach

check this link :

http://msdn.microsoft.com/en-us/library/6a3b7fc3-3d91-4d12-8371-42ea12e74517

basically, you develop button at webpart with specified url, when the url is hit, it will automatically generate format based on your choice, example :

PDF for pdf, WORD for doc, WORDOPENXML for docx( only at SSRS 2012 i think), EXCEL for xls, EXCELOPENXML for xlsx ( only at SSRS 2012 i think)

in my case i have SSRS SharePoint integrated mode, but this solution is work both for native SSRS or integrated mode (the downside for native version, it will ask for credential again by default, which many user wont like it)

if you want pass parameter inside the report, check this link

http://msdn.microsoft.com/en-us/library/f93a94cc-27b5-435a-aa85-69e6ec6459ad

4
  • This looks complex than I imagined. Commented Jan 1, 2014 at 8:46
  • which section you think complex ? i will try to give example :) Commented Jan 1, 2014 at 11:56
  • I mean does SSRS requires some service/feature to be installed in SQL Server? I have started using RDLC to generate PDF let's say how it goes. Commented Jan 1, 2014 at 12:18
  • actually it is, here is the link step by step to configure SSRS sharepoint integrated mode for sharepoint 2013 and sql 2012 (different version will have different step) msdn.microsoft.com/en-us/library/jj219068.aspx Commented Jan 1, 2014 at 12:47
0

I'm wondering why haven't you considered, for the most flexible - though not the fastest to implement, however fairly easy - Word Automation Services (require Enterprise license) which will allow you to convert to PDF/XPS anything coming from Word - which using OpenXml could in few lines of code get desired results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.