Need code to export SQL result to PDF in SQL Server2008

  • Hi guys,

    I'm a .NET guy, first time am working on sql.

    I have a requirement like, i need to export the results of a stored procedure to a pdf file.

    We are using sql 2008.

    Can someone help me with this? Its pretty urgent !

    Thanks,

    ARUN SHANKAR

  • this is typically dones via Reporting Services or a third party tools.

    I've done it with a web service that cosumes a dataset and returns a binary blob, which cna be written to disk via a CLR.

    SQL server, with the exception of sqlcmd/bcp, doens't have any native tools to write to disk.

    SQL can write a text file, so you can get away with fixed width, csv or even html with a little bit of work.

    rtf and pdf are much much more difficult.

    if you can live with an EXTREMELY limited PDF export, like no data wider than 80 characters, no alignment other than raw text formatting, there's this old old article and example here:

    http://www.sqlservercentral.com/articles/Miscellaneous/creatingapdffromastoredprocedure/1104/

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply