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 «««910111213

Creating a PDF from a Stored Procedure Expand / Collapse
Author
Message
Posted Thursday, November 14, 2013 1:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 14, 2013 1:42 AM
Points: 3, Visits: 1
arronwall1 (8/8/2013)
Hi, I think you can do it yourself. I am not a long-term user working with document and image processing. But I can do a lot work about it totally by myself with the help of some fine 3rd party document and image tools. As for myself, I used to format PDFs with the help of another PDF SDK. It is just one of many but I do appreciate its simple way of processing. Even though I only tried its free trial package to generate PDFs according to its tutorials about how to generate PDFs using C#.NET and didn′t check the cost and licensing conditions, it worked great for me. Share with you. And I hope you success. Good luck.



Best regards,
Arron

Hi there
Thanks for your sharing.That sounds great.I'd like to have a try.But if it is expensive for pdf creating?By the way ,i want to know that whether this pdf program can work
offline?Thanks a lot.
Post #1514171
Posted Monday, November 18, 2013 12:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 9:01 AM
Points: 6, Visits: 43
This doesn't work in MS-SQL 2005 where I created the example and PDF reader 9.00
Post #1515117
Posted Monday, November 18, 2013 1:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 9:01 AM
Points: 6, Visits: 43
Sory. I take my comment back. It works! My bug.
Post #1515129
Posted Thursday, November 21, 2013 2:33 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, May 15, 2014 8:51 PM
Points: 183, Visits: 480
This does not work for me. Here is my attempt at trying to get it to work. The pdf generated is blank.

System - Local SQL server 2008 R2 Dev edition, Windows 7 64 home premium bit. Adobe PDF reader 11.

I got several errors of the same type -

SQL Server blocked access to procedure 'sys.sp_OADestroy' of component 'Ole Automation Procedures' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ole Automation Procedures' by using sp_configure. For more information about enabling 'Ole Automation Procedures', see "Surface Area Configuration" in SQL Server Books Online.

Solution -

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE;
GO

Source - http://blog.consultdba.com/2010/09/how-to-enable-ole-automation-procedures.html

Exec result -
Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
Configuration option 'Ole Automation Procedures' changed from 0 to 1. Run the RECONFIGURE statement to install.

Now trying to create pdf ...
Blank PDF created, with one error in SQL server.

Error -
SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online.

Solution -

---- To allow advanced options to be changed.

EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO

Source - http://blog.sqlauthority.com/2007/04/26/sql-server-enable-xp_cmdshell-using-sp_configure/]

Exec result -

Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
Configuration option 'xp_cmdshell' changed from 0 to 1. Run the RECONFIGURE statement to install.


Attempting to make pdf again...
Query successful. ZERO errors.

PDF file created, but BLANK.

END RESULT = Failure.
Post #1516589
Posted Wednesday, July 16, 2014 4:07 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 4:48 AM
Points: 1, Visits: 4
Nice stored procedure...

good work..

It would be great if you can make it customized to use different data sources.

Awaiting your feedback for the same.

Cheers!!
Post #1592975
Posted Wednesday, July 30, 2014 1:25 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 18, 2014 7:29 PM
Points: 1, Visits: 8
the file is located in the machine where the sql server is installed.
Post #1597599
« Prev Topic | Next Topic »

Add to briefcase «««910111213

Permissions Expand / Collapse