Sunday, March 25, 2012
EXporting data to xml file
I've got a table of which I would need obtain a XML file. How do I such
thing?
I mean, instead of to obtain a .DAT or .CSV from that table as it customary,
a xml.
Any advice or though woud be greatly.
Regards,just adding for xml clause gives output in xml format
select * from <table> for xml. However this has lot of options too.
BOL has this example
CREATE VIEW p AS
SELECT od.OrderID,
pr.ProductName,
od.Quantity,
od.UnitPrice,
od.Quantity * od.UnitPrice AS total
FROM Products AS pr
JOIN
[Order Details] AS od
ON
pr.ProductID = od.ProductID
And then write the SELECT statement:
SELECT c.CompanyName,
o.OrderID,
o.OrderDate,
p.ProductName,
p.Quantity,
p.UnitPrice,
p.total
FROM Customers AS c
JOIN
Orders AS o
ON
c.CustomerID = o.CustomerID
JOIN
p
ON
o.OrderID = p.OrderID
FOR XML AUTO
--
Regards
R.D
--Knowledge gets doubled when shared
"Enric" wrote:
> Dear all,
> I've got a table of which I would need obtain a XML file. How do I such
> thing?
> I mean, instead of to obtain a .DAT or .CSV from that table as it customar
y,
> a xml.
> Any advice or though woud be greatly.
> Regards,|||thanks a lot,
"R.D" wrote:
> just adding for xml clause gives output in xml format
> select * from <table> for xml. However this has lot of options too.
> BOL has this example
> CREATE VIEW p AS
> SELECT od.OrderID,
> pr.ProductName,
> od.Quantity,
> od.UnitPrice,
> od.Quantity * od.UnitPrice AS total
> FROM Products AS pr
> JOIN
> [Order Details] AS od
> ON
> pr.ProductID = od.ProductID
> And then write the SELECT statement:
> SELECT c.CompanyName,
> o.OrderID,
> o.OrderDate,
> p.ProductName,
> p.Quantity,
> p.UnitPrice,
> p.total
> FROM Customers AS c
> JOIN
> Orders AS o
> ON
> c.CustomerID = o.CustomerID
> JOIN
> p
> ON
> o.OrderID = p.OrderID
> FOR XML AUTO
> --
> Regards
> R.D
> --Knowledge gets doubled when shared
>
> "Enric" wrote:
>|||Enric,
Also undestand that the XML that is produced is an XML fragment not an valid
XML document. You'll need to add a XML tag and a root element.
HTH
Jerry
"R.D" <RD@.discussions.microsoft.com> wrote in message
news:5FC7B338-98E4-4C5A-A62E-A81E661DD1AF@.microsoft.com...
> just adding for xml clause gives output in xml format
> select * from <table> for xml. However this has lot of options too.
> BOL has this example
> CREATE VIEW p AS
> SELECT od.OrderID,
> pr.ProductName,
> od.Quantity,
> od.UnitPrice,
> od.Quantity * od.UnitPrice AS total
> FROM Products AS pr
> JOIN
> [Order Details] AS od
> ON
> pr.ProductID = od.ProductID
> And then write the SELECT statement:
> SELECT c.CompanyName,
> o.OrderID,
> o.OrderDate,
> p.ProductName,
> p.Quantity,
> p.UnitPrice,
> p.total
> FROM Customers AS c
> JOIN
> Orders AS o
> ON
> c.CustomerID = o.CustomerID
> JOIN
> p
> ON
> o.OrderID = p.OrderID
> FOR XML AUTO
> --
> Regards
> R.D
> --Knowledge gets doubled when shared
>
> "Enric" wrote:
>
Sunday, March 11, 2012
Export to PDF stopped working after XP SP2 is installed on client's machine
We are having a problem after XP SP2 is installed on the user's machine, the
export to PDF no longer works as instead on opening the report in PDF format
inside the browser it actually tries to save the .aspx page, I think it is
something to do with MIME types.
Has anyone noticed this issue and is there a work around.
Please help
Rahulmake sure your adobe reader is installed properly. we had this problem
to, and it turned out that adobe installation had not been completed.
This was only a problem with the new adobe 6.2, 6.0 was fine.
"Rahul Agarwal" <agarwal_rahul@.hotmail.com> wrote in message news:<#R7F9aOpEHA.324@.TK2MSFTNGP11.phx.gbl>...
> Hi All
> We are having a problem after XP SP2 is installed on the user's machine, the
> export to PDF no longer works as instead on opening the report in PDF format
> inside the browser it actually tries to save the .aspx page, I think it is
> something to do with MIME types.
> Has anyone noticed this issue and is there a work around.
> Please help
> Rahul
Wednesday, March 7, 2012
Export to Excel Range
I have an SSIS package that exports data to a named range in Excel, except that instead of putting the data in the named range, it adds the first row of data to the first row below the range. The spreadsheet is not protected. Why doesn't the data get put into the named range?
When I'm done testing the SSIS package, I want to protect the spreadsheet and enable edit for the named range so that data can be written using the SSIS package. Will enabling the named range be necessary?
Dan
Dan:
I have not used named ranges in particular to populate data, but in general, when you use Excel as the destination you do not have the option to "overwrite" the data as you do in a Flat File destination. The problem you are experiencing could be because your package is updating the same Excel file during each run.
Does it always insert a new row one row below the named range? What happens when you run the package 2 or 3 times; each time it should be inserting new records at the n+1th row.
The issue of populating Excel destination has been discussed in previous threads and Rafael Salas apparently as a solution for it. I am not sure if his solution addresses populating Named Ranges particularly.
Rafael has a blog at blogspot.com, and is also listed in the Top Answerer box. When you click on his name it provides details of his profile.
|||The first step in the SSIS package is to execute a file server component that copies and renames a spreadsheet template to the spreadsheet I'm trying to populate. I've deleted the data range and removed any read-only settings. What has worked is to create and use a header range which then populates data in the first row immediately following. Thanks for the response and reference to Rafael Salas.Export to Excel Range
I have an SSIS package that exports data to a named range in Excel, except that instead of putting the data in the named range, it adds the first row of data to the first row below the range. The spreadsheet is not protected. Why doesn't the data get put into the named range?
When I'm done testing the SSIS package, I want to protect the spreadsheet and enable edit for the named range so that data can be written using the SSIS package. Will enabling the named range be necessary?
Dan
Dan:
I have not used named ranges in particular to populate data, but in general, when you use Excel as the destination you do not have the option to "overwrite" the data as you do in a Flat File destination. The problem you are experiencing could be because your package is updating the same Excel file during each run.
Does it always insert a new row one row below the named range? What happens when you run the package 2 or 3 times; each time it should be inserting new records at the n+1th row.
The issue of populating Excel destination has been discussed in previous threads and Rafael Salas apparently as a solution for it. I am not sure if his solution addresses populating Named Ranges particularly.
Rafael has a blog at blogspot.com, and is also listed in the Top Answerer box. When you click on his name it provides details of his profile.
|||The first step in the SSIS package is to execute a file server component that copies and renames a spreadsheet template to the spreadsheet I'm trying to populate. I've deleted the data range and removed any read-only settings. What has worked is to create and use a header range which then populates data in the first row immediately following. Thanks for the response and reference to Rafael Salas.Sunday, February 26, 2012
export to excel from a report
Is there a way to do it? I know that there is a parameter that I can add to the url for this but i don't know exactly how to add it to the current url from my report).
Thanks
From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comsee my reply on "Nicknack" user query
Amarnath
"roy mm" wrote:
> Hi, I would like to have a button on my report to export it to excel (instead of having to choose the format from the toolbar and then press "export").
> Is there a way to do it? I know that there is a parameter that I can add to the url for this but i don't know exactly how to add it to the current url from my report).
> Thanks.
> From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
>
Export to excel button
Is there a way to do it? I know that there is a parameter that I can add to the url for this but i don't know exactly how to add it to the current url from my report).
Thanks.
Here is a slightly changed sample from the BOL:
http://servername/reportserver?/Sales/YearlySalesSummary&rs:Format=EXCEL4.0&rs:Command=Render
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||I didn't get how this help me?
i need to get the full url in order to add my EXPORT parameter to it.
I'm also working with oracle and the command "select @.@.servername as 'a'" did dont worked.
thanks
|||Parameters can simply be added after the report name as the following:
ReportName?ParameterName=SomeValue?AnotherParameterName=AnotherValue
@.@.ServerName is a global variable of TSQL not PLSQL, you will need the equivalent which is, AFAIK something with instance_Name, Like SELECT Instance_Name from V$Instance.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de