4

As a requirement, I have to check for a certain condition on some data in the database, if the condition is true, then I have to create a pdf report and store it on a table.

I have everything set up as a T-SQL SP except the pdf report part.

Is there anyway to execute an SSRS Report, export it to PDF and store the pdf in a varbinary column directly from T-SQL ?

Otherwise the only solution would be creating a Windows Service to do this (I Know how to do this but the T-SQL way would give me more flexibility).

Thanks!

2
  • There are code examples around (geekswithblogs.net/bsherwin/archive/2007/04/29/112094.aspx) that show you how to render a report directly to a PDF. I imagine you could use that, store the file in a temp location and then insert the the file into the DB.
    – D.S.
    Commented Aug 31, 2012 at 17:40
  • I Know how to do that, i wanted to know if i could do it using t-sql for it's flexibility. Thanks
    – Calbertoferreira
    Commented Sep 1, 2012 at 9:52

1 Answer 1

2

You should be able to write any sort of code in .Net and connect it into SQL Server. See http://www.codeproject.com/Articles/19954/Execute-NET-Code-under-SQL-Server-2005 for an example.

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.