SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Creating a PDF from a Stored Procedure


Creating a PDF from a Stored Procedure

Author
Message
Andy Warren
Andy Warren
SSC-Forever
SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)

Group: Moderators
Points: 40360 Visits: 2770
I agree about the comments and I'll take the blame - I load the content, should have gotten it cleaned up. I'll try to do better!

Andy
http://www.sqlservercentral.com/columnists/awarren/

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
ivica
ivica
SSC Veteran
SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)

Group: General Forum Members
Points: 227 Visits: 20
Where do you find the specs for the PDF format?

http://partners.adobe.com/asn/tech/pdf/specifications.jsp



amfps
amfps
SSC Veteran
SSC Veteran (280 reputation)SSC Veteran (280 reputation)SSC Veteran (280 reputation)SSC Veteran (280 reputation)SSC Veteran (280 reputation)SSC Veteran (280 reputation)SSC Veteran (280 reputation)SSC Veteran (280 reputation)

Group: General Forum Members
Points: 280 Visits: 24
I've tried and it works quite great.

However I would like to know if it's possible to use different letter sizes and formats (bold, italic) and if it's possible to save the file in any directory.



ivica-105479
ivica-105479
Valued Member
Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)

Group: General Forum Members
Points: 60 Visits: 1
Now, you can't use different letter properties, maybe later

to save the file in any directory
try this EXEC sql2pdf 'backup\demo'
backup is direcory



sokun2003
sokun2003
SSC-Enthusiastic
SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)

Group: General Forum Members
Points: 131 Visits: 13
i have the following error message :
SYNTAXE ERROR TO CONVERT varchar 'TOTO' TO DATA COLUMN TYPE int...

when i tried to insert the data into psopdf

(insert psopdf(code) select nb_client + ' ' +
tx_shor_name + ' ' +
tx_full_name + ' ' +
id_acco_offi + ' ' +
cd_cli_stat from bdaccess..bsycl)

do i miss something ?

tks in advance



ivica-105479
ivica-105479
Valued Member
Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)

Group: General Forum Members
Points: 60 Visits: 1
convert int column into varchar by cast



sokun2003
sokun2003
SSC-Enthusiastic
SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)

Group: General Forum Members
Points: 131 Visits: 13
quote:

convert int column into varchar by cast



i dont get what u said...sorry...coz the column of psopdf is already in varchar
why sqlserver tried to convert 'TOTO' in to the INT column? where does this "INT column" come from ? i really dont get it...sorry

can u pls explain ? tks



ivica
ivica
SSC Veteran
SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)

Group: General Forum Members
Points: 227 Visits: 20
try like this --> SELECT CAST(nb_client AS VARCHAR) + ' ' + CAST(tx_shor_name AS VARCHAR) ...



gimpygoat
gimpygoat
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 23
WOW! A++++++ this is a super procedure! Kudos to you for all your hard work! I am using this on a production DB that logs all firewall / web traffic event logs. I then setup this up as a job that runs daily and creates pdf reports based upon various criteria. Again, great job on the procedure and thanks for giving those easy to understand screenshots and how to's!



dgentry
dgentry
SSC Journeyman
SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)

Group: General Forum Members
Points: 80 Visits: 198
Excellent, excellent sp!



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search