f



.xml (XML Spreadsheet 2003) to .pdf file

Hi,
Anybody have any idea, how to convert a .xml file (XML Spreadsheet 2003) to a .pdf file in Sql Server only.


I am trying below approach.
Open the .xml file in excel.application using sp_oa Methods.
And then save as .pdf file.


the issue is, I am not able to open the .xml file into  window.application using oa methods.

Regards
Rahul
0
Rahul
6/28/2016 3:07:29 PM
comp.databases.ms-sqlserver 14567 articles. 1 followers. janinepelletier (108) is leader. Post Follow

4 Replies
471 Views

Similar Articles

[PageSpeed] 26

Rahul Verma (rahul.girdharwal@gmail.com) writes:
> Anybody have any idea, how to convert a .xml file (XML Spreadsheet 2003)
> to a .pdf file in Sql Server only. 
> 

What? SQL Server is a tool for data processing, not file conversion.

> I am trying below approach.
> Open the .xml file in excel.application using sp_oa Methods.
> And then save as .pdf file.
> 
> the issue is, I am not able to open the .xml file into 
> window.application using oa methods. 
 
Calling anything that interact with the desktop from a service (which 
does not have a desktop) is an utterly bad idea.

I would suggest that you go back to the drawing board and think of a
different solution that does not involve SQL Server.

-- 
Erland Sommarskog, Stockholm, esquel@sommarskog.se
0
Erland
6/28/2016 7:15:29 PM
On Wednesday, June 29, 2016 at 12:45:30 AM UTC+5:30, Erland Sommarskog wrote:
> Rahul Verma (rahul.girdharwal@gmail.com) writes:
> > Anybody have any idea, how to convert a .xml file (XML Spreadsheet 2003)
> > to a .pdf file in Sql Server only. 
> > 
> 
> What? SQL Server is a tool for data processing, not file conversion.
> 
> > I am trying below approach.
> > Open the .xml file in excel.application using sp_oa Methods.
> > And then save as .pdf file.
> > 
> > the issue is, I am not able to open the .xml file into 
> > window.application using oa methods. 
>  
> Calling anything that interact with the desktop from a service (which 
> does not have a desktop) is an utterly bad idea.
> 
> I would suggest that you go back to the drawing board and think of a
> different solution that does not involve SQL Server.
> 
> -- 
> Erland Sommarskog, Stockholm, esquel@sommarskog.se

Hi Erland,

Thanks for mailing.
But my requirement is to convert it within sql server.
The reason is.....I want to call this stored procedure from my stored procedure to within SSRS report to export the report in excel/ pdf.

Till yet i got success to export the same into excel (.xml) format.
The reason of exporting all by coding, not using internal ssrs export functionality, is SSRS export data in worst format.

I got success to export the same into .xml file. But unfortunately not able to open this .xml file into sp_oaMethod window.application.

Any idea/ help will be greatly appreciated.  

Thanks
Rahul 
0
Rahul
6/29/2016 7:02:49 AM
Rahul Verma (rahul.girdharwal@gmail.com) writes:
> But my requirement is to convert it within sql server. The reason
> is.....I want to call this stored procedure from my stored procedure to
> within SSRS report to export the report in excel/ pdf. 
> 
> Till yet i got success to export the same into excel (.xml) format. The
> reason of exporting all by coding, not using internal ssrs export
> functionality, is SSRS export data in worst format. 
> 
> I got success to export the same into .xml file. But unfortunately not
> able to open this .xml file into sp_oaMethod window.application. 
> 

Do you mean that you first produce the .XML file and then want to produce
a PDF file from the XML? Why not produce the PDF directly from inside 
SSRS?

I don't know SSRS, so I cannot help you with that part. But I what I 
can say is that you are on the completely wrong track and you need to
return to your starting point to find a better solution to your overall
problem. It doesn't matter whether your problem to open the XML document
can be overcome, because such things should never be done anyway.

-- 
Erland Sommarskog, Stockholm, esquel@sommarskog.se
0
Erland
6/29/2016 7:47:56 AM
On Wednesday, 29 June 2016 08:47:56 UTC+1, Erland Sommarskog  wrote:
> Rahul Verma (rahul.girdharwal@gmail.com) writes:
> > But my requirement is to convert it within sql server. The reason
> > is.....I want to call this stored procedure from my stored procedure to
> > within SSRS report to export the report in excel/ pdf. 
> > 
> > Till yet i got success to export the same into excel (.xml) format. The
> > reason of exporting all by coding, not using internal ssrs export
> > functionality, is SSRS export data in worst format. 
> > 
> > I got success to export the same into .xml file. But unfortunately not
> > able to open this .xml file into sp_oaMethod window.application. 
> > 
> 
> Do you mean that you first produce the .XML file and then want to produce
> a PDF file from the XML? Why not produce the PDF directly from inside 
> SSRS?
> 
> I don't know SSRS, so I cannot help you with that part. But I what I 
> can say is that you are on the completely wrong track and you need to
> return to your starting point to find a better solution to your overall
> problem. It doesn't matter whether your problem to open the XML document
> can be overcome, because such things should never be done anyway.

I am finding it a little difficult to understand Rahul
writing in English, but I think he's saying that SSRS
produces the data but with presentation that is ugly
or is difficult to read, but he can make it look good
in an Excel XML spreadsheet (somehow; maybe it just
does look better in Excel).  

Well, there are alternatives to SSRS for generating
reports, but some of them are very expensive - 
or are expensive when you pay, and are paid,
to use them.  Or if not expensive, only simple 
reports can be produced.

I suppose that another approach, if the data is in
SQL Server to start with, is to produce HTML,
by surrounding data values with text codes for
table arrangements and so forth.  The hard way.
For reading a report, HTML is as popular as PDF.
0
rja
6/29/2016 9:07:50 PM
Reply: