locked
Suggestions Needed :: Generating PDF letters from SQL Server RRS feed

  • Question

  • Hi All,

    Suggestions needed for generating different types of letter (PDF formats) from SQL server? appreciate your help


    -- Sathish

    Thursday, July 9, 2015 3:16 PM

Answers

  • You can use SQL2Pdf to convert your SQL statement to PDF, sample code can be found in this article.

    Other than this, I would recommend you to conider

    • use SSRS to generate PDF file (Sample code)
    • Use C#/VB.NET to build your fully customize PDF file. (Few libraries that can do this for you is PDFSharp, ITextSharp etc..)

    Hope this will give you a quick start


    Glad to help! Please remember to accept the answer if you found it helpful. It will be useful for future readers having same issue.


    My Profile on Microsoft ASP.NET

    Thursday, July 9, 2015 3:28 PM
  • Hi Sathish

    The only real option you have for easily generating PDF's is through reporting services. When viewing the report through the report viewer you are given an export option that will allow you to save a PDF version of the report to disk.

    https://msdn.microsoft.com/en-us/library/dd239307.aspx?f=255&MSPPError=-2147217396

    To automate the process a bit more you can also set the rendering format in the URL

    http://myrshost/ReportServer?/myreport&rs:Format=PDF

    https://msdn.microsoft.com/en-us/library/ms154040.aspx

    Thursday, July 9, 2015 3:33 PM

All replies

  • You can use SQL2Pdf to convert your SQL statement to PDF, sample code can be found in this article.

    Other than this, I would recommend you to conider

    • use SSRS to generate PDF file (Sample code)
    • Use C#/VB.NET to build your fully customize PDF file. (Few libraries that can do this for you is PDFSharp, ITextSharp etc..)

    Hope this will give you a quick start


    Glad to help! Please remember to accept the answer if you found it helpful. It will be useful for future readers having same issue.


    My Profile on Microsoft ASP.NET

    Thursday, July 9, 2015 3:28 PM
  • Hi Sathish

    The only real option you have for easily generating PDF's is through reporting services. When viewing the report through the report viewer you are given an export option that will allow you to save a PDF version of the report to disk.

    https://msdn.microsoft.com/en-us/library/dd239307.aspx?f=255&MSPPError=-2147217396

    To automate the process a bit more you can also set the rendering format in the URL

    http://myrshost/ReportServer?/myreport&rs:Format=PDF

    https://msdn.microsoft.com/en-us/library/ms154040.aspx

    Thursday, July 9, 2015 3:33 PM