Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

pdf generation in sql Expand / Collapse
Author
Message
Posted Tuesday, January 15, 2013 11:25 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, January 17, 2013 11:36 PM
Points: 1, Visits: 3
i have a simple table with 3 columns and 3 rows.
is it possible to generate a pdf document by directly firing query in SQL which contains the table and its contents?
Post #1407621
Posted Wednesday, January 16, 2013 1:00 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:28 AM
Points: 13,641, Visits: 11,517
You can use Reporting Services (SSRS) for that.
Just build a very simple report using a table.
Output the report to pdf and you're done.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1407646
Posted Wednesday, January 16, 2013 2:46 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Sunday, November 30, 2014 7:56 PM
Points: 29, Visits: 86
I've made use of a CLR to do this, very fast, did pay about $US 300 for the DLL's but that paid for itself many times over. If you're keen on this I can dig around and get you more details. We use it to generate personalised legal contracts, at reasonable volumes. and never had a miss fire from the CLR so far, this process has been going about 5 months now, so seems quite reliable.

we're really just populating a contract that was composed in word and then really just converting/printing that to PDF.

Tell me if you are interested.
Post #1407703
Posted Wednesday, January 16, 2013 3:23 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, December 11, 2014 9:19 PM
Points: 1,129, Visits: 1,164
ShineBoy (1/16/2013)
I've made use of a CLR to do this, very fast, did pay about $US 300 for the DLL's but that paid for itself many times over. If you're keen on this I can dig around and get you more details. We use it to generate personalised legal contracts, at reasonable volumes. and never had a miss fire from the CLR so far, this process has been going about 5 months now, so seems quite reliable.

we're really just populating a contract that was composed in word and then really just converting/printing that to PDF.

Tell me if you are interested.


For word to pdf convertors , there are plenty of tools available ; or write a C# code to do that , the code is also available on internet.

Well, I think SSRS approach is well and good enough for this work ...or if BI tools are not available then download the report editor tool , it is free and I think does have functionality of exporting reports in pdf's.


~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one
Post #1407720
Posted Thursday, January 17, 2013 6:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, November 8, 2014 8:30 AM
Points: 1, Visits: 8
Hi, we use ASPPdf from persits for this and it has worked very well. Rather than clr we use OA procedures.

Asppdf.com

Regards



Post #1408377
Posted Thursday, January 17, 2013 1:14 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Sunday, November 30, 2014 7:56 PM
Points: 29, Visits: 86
You're right plenty of Word to PDF convertors around. But most require Word installed on the machine. We had a need whereby the Compliance Officer would be able to alter the source contract (or template) easily, that really meant Word. BUT as we are generating the PDF off the server we did not want to install Word on it. The solution we used meant no Word installed on the server, just access to the Word file. We chose a CLR simply because most of the process is in TSQL and ease I guess.
Post #1408589
Posted Thursday, January 17, 2013 11:31 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, February 4, 2013 12:43 AM
Points: 10, Visits: 45
Follow the blog in servercentral

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

Also another useful link

http://www.codeproject.com/Articles/19236/Create-data-driven-PDF-on-the-fly-by-using-SQL-ser
Post #1408724
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse