Showing posts with label datasource. Show all posts
Showing posts with label datasource. Show all posts

Friday, March 30, 2012

Prediction Join to MDX with nested table

If your prediction join is to a SQL datasource, you can easily write a SQL query which returns a nested table like:

SELECT
Predict([Subcategories],2) as [Subcategories]
FROM
[SubcategoryAssociations]
NATURAL PREDICTION JOIN
(SELECT
(SELECT 'Road Bikes' AS Subcategory
UNION SELECT 'Jerseys' AS Subcategory
) AS Subcategories
) AS t

What about if your datasource is a cube? Is there some special MDX syntax similar to the SQL syntax above? Or do you have to utilize the SHAPE/APPEND syntax as follows?

SELECT t.*, $Cluster as ClusterName
FROM [MyModel]
PREDICTION JOIN
SHAPE {
select [Measures].[My Measure] on 0,
[My Dimension].[My Attribute].[My Attribute].Members on 1
from MyCube
}
APPEND (
{
select [Measures].[Another Measure] on 0,
NON EMPTY [My Dimension].[My Attribute].[My Attribute].Members
*[Product].[Product].[Product].Members on 1
from MyCube
}
RELATE [[My Dimension]].[My Attribute]].[My Attribute]].[MEMBER_CAPTION]]]
TO [[My Dimension]].[My Attribute]].[My Attribute]].[MEMBER_CAPTION]]]
)
AS [My Nested Table] AS t
ON [MyModel].[Product].[Product] = t.[My Nested Table].[[Product]].[Product]].[Product]].[MEMBER_CAPTION]]]

Typically, for building models on top of cubes, it is much easier to use the tools (BI Dev Studio). This way you can define your model directly on top of the cube and lots of optimizations occur. With such models, you can even use the MDXPredict function to get prediction results inside MDX queries over the source cube.

The DMX SELECT statement supports as input rowset-returning Analysis Services statements (MDX or DMX). That means that dataset-returning statements are not supported. But many MDX queries can be flattened. Have you tried something like SELECT FLATTENED in the MDX query?

|||

Bogdan-

Thanks for the reply. Yes, BIDS worked great for building the model. I've got it trained. Now I want to do a prediction based upon data from a cube. From what I can tell, you can't do prediction queries off a cube using BIDS because it only lets you predict off a relational table source. Right?

I've been researching the MDX function "Predict" which you mentioned. But I'm having terrible trouble finding example queries using that function...

Here's what I'm looking for... we've built a clustering model to cluster our stores. Some of the attributes are just Store dimension attributes... some are from a nested table (stats about the sales volume from each product category). We trained the model with all the stores. Now we want to extract the cluster name for each store and save that to a table. So is there a straight MDX query using the Predict MDX function which will get me the cluster name for every store? I was having trouble seeing how the Predict MDX function was able to know how to do a prediction join to the Store dimension.

As a side note, we could almost do a natural prediction join back to (select * from Model.CASES) except that we don't want the Store Key to influence the clustering model so we didn't add that as an input to the model. (And marking Store Key as Ignore excludes it from the Model.CASES resultset.)

By the way, we're only talking about a couple hundred rows, so the performance of the SHAPE/APPEND syntax below is fine for my purposes... just seeing if there's a more elegant way to do it.

Thanks!

|||

Oh... and to answer your other question about trying "SELECT FLATTENED"...

It's my understanding that "SELECT FLATTENED" is DMX. I'm not sure how to write an MDX statement that starts with "SELECT FLATTENED". And I'm struggling to see how using the DMX "SELECT FLATTENED" would help me. The output of DMX prediction query I used in the examples at the beginning of the thread work fine. I suppose I could flatten the output, but that wouldn't help me much. It's the input to the prediction join that I'm concerned with.

Or did you mean that you can use an MDX query which is written to be flat and use that as input to a prediction query which expects nested tables? I just tried that but may not have been using the right syntax cause I couldn't get it to work. Suggestions?

|||

You kind of need to do it brute force -we use the flattening semantics of MDX when executing the query, so you have to reshape using SHAPE.

There is a little trick to help you out in building the queries. You can use DMX to examine the flattened structure of the MDX query. Just issue a query like this:

SELECT t.* FROM AnyModel NATURAL PREDICTION JOIN <My MDX Query> AS t

then you will be able to see how the DMX processor sees your MDX results.

|||

Jamie-

That trick is helpful for seeing how it refers to the results of an MDX query.

But how do I take a flat MDX query and shape it so it can be consumed by a prediction join which expects a nested table. See the MDX example at the top of this post. Is that the only way (tying two separate MDX queries together with SHAPE/APPEND)?

|||

Yes your original SHAPE/APPEND would be the way to go.

The implementation of SHAPE in the AS engine will cause the MDX query results to be automatically returned in a flattened manner without requiring any explicit flattening syntax in the query itself (in fact, there is no such syntax - flattening is requested as either a command property in XMLA or by requesting a rowset interface in OLE DB)..

Monday, March 12, 2012

Possible to use a Sharepoint List as a Datasource?

In Reporting Services 2005, is it possible to create a data connection to a sharepoint list? If so, what connection type and connection string do i use for this?It is possible using the Xml Data processing extension. Sharepoint exposes a Lists.asmx webservice, which can be queried using the Xml data processing extension.

Connection String:
http://<YourServerName>/sites/sitename/_vti_bin/Lists.asmx

Xml Query:

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetList">
</Method>
<ElementPath IgnoreNamspaces="true">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

Dataset Parameter:
Name: listName, Value: The name of the list you want from the site.

Notes:
You may need to play with the ElementPath to get what you need. See this page for more information: http://msdn2.microsoft.com/en-us/library/ms365158.aspx|||

This is good as I have this exact requirement, but get

TITLE: Microsoft Report Designer

An error occurred while executing the query.
Failed to execute web request for the specified URL.


ADDITIONAL INFORMATION:

Failed to execute web request for the specified URL. (Microsoft.ReportingServices.DataExtensions)

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was thrown.</faultstring>
<detail>
<errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Value cannot be null.</errorstring>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>


BUTTONS:

OK

Any ideas

|||

I would suggest that you use the informations provided by Teun Duynstee in this link:

http://www.teuntostring.net/blog/2005/09/reporting-over-sharepoint-lists-with.html

Cheers
Markus

|||The error that you are getting for the GetList method is most likely caused by not using the correct name of the list. The listName must be either the title or the GUID for the list.

For more info on this method http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/soapmListsGetList_SV01034346.asp

|||

Hi,

In case you are interested we are selling a reporting services (both 2000 and 2005 version) data extension for sharepoint.

This extension makes it possible to build report using sharepoint lists (including libraries).

Several lists may be joined using SQL-like operators.

Reports parameters may be used with the query string.

An evaluation version is available on our site at http://www.enesyssoftware.com/Default.aspx?tabid=56

If you prefer to do it by yourself, the article from Teun Duynstee is the way to go.

Frdric LATOUR

http://www.enesyssoftware.com

|||

Hi,

I have the same requirement of getting the data from List in SharePoint 2007. It exposed the method GetList(). I am using the same code which you have mentioned. But is not working.

Reporting Service SP 2 provide XML DataSource

Can you please rectify where i am going wrong. I have a List by name say: Announcements

How to Specify List Name and Where? I am unable to undertand your Dataset Parameter.

Dataset Parameter:
Name: listName, Value: The name of the list you want from the site.

I tried few combinations.

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/Announcements</ElementPath>
</Query>

Please help. As this will save me from writing DATA Extensions for my reports integration with sharepoint 2007

|||There are two ways to specify parameters for an Xml Data Processing Extension query.

1. Use the Reporting Services Dataset query parameters collection.

Add a query parameter to the dataset with the name 'listName' and value 'Announcements'.

2. Add the parameters directly to the Xmlk query, using the Parameters Xml element, which is a child of the Method element.

Add the following Xml as the child element to the Method element in the query above.

<Parameters>
<Parameter Name="listName">
<DefaultValue>Announcements</DefaultValue>
</Parameter>
</Parameters>

Ian|||

Hi,

I tried as you said now my query is. Previoisly i was not in sharepoint integration mode. so i was giving another error. Now i am getting the error as "Error While reading XML reponse"

My Data Source is:
http://localhost/Docs/vti_bin/Lists.asmx

My Query is :
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
<Parameters>
<Parameter Name="listName" Type="String">
<DefaultValue>Announcements</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath>GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

My Web Service is :

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetListResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<GetListResult>
<xsd:schema>schema</xsd:schema>xml</GetListResult>
</GetListResponse>
</soap12:Body>
</soap12:Envelope>

I have tried all combinations. 1) Isn't there any tool where i can construct this query 2) I am not able to view the dataset result in XML, so that i can map it with <ElementPath>. I am not able to test webservice with this "http://localhost/Docs/_vti_bin/Lists.asmx?op=GetList" URL, to view the dataset result.

|||
The exception you see being thrown is usually a wrapped exception that occurs in the call in the request/response phase, most likely a permissions issue. Check the log files for more information about this exception.

Also, regarding the ElementPath:

Try setting the IgnoreNamespaces attribute to true on the ElementPath element:

<ElementPath IgnoreNamespaces="true">

Answers to your questions:

1. Unfortunately, no, there is no tool at this time.
2. After you set the attribute mentioned above, try making the ElementPath less restrictive and to return the Xml as is. For example, this will return one field containing the raw Xml of the GetListResult element. You can use this to information see what the elements are in the GetListResult.

<ElementPath IgnoreNamespaces="true">GetListResponse{GetListResult(XML)}</ElementPath>

Ian|||

Hi,

This time i tried all below combionations bit its still not working. I have wasted lot of effots on this and this is very important for me to get it solved.

ERROR its Gives in Log is
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring><detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Value cannot be null.</errorstring></detail></soap:Fault></soap:Body></soap:Envelope>

http://localhost/_vti_bin/Lists.asmx

GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Name="GetList" Namespace= "http://schemas.microsoft.com/sharepoint/soap">
<Parameters>
<Parameter Name="listName">
<DefaultValue>21CF03AF-3A7E-479C-98E0-CBE0F16A594A</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">GetListResponse{GetListResult(XML)}</ElementPath>
</Query>

WithOut GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Name="GetList" Namespace= "http://schemas.microsoft.com/sharepoint/soap">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Contacts</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">GetListResponse{GetListResult(XML)}</ElementPath>
</Query>

GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
<Parameters>
<Parameter Name="listName">
<DefaultValue>21CF03AF-3A7E-479C-98E0-CBE0F16A594A</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>


WithOut GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Contacts</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

Please Help!!!

|||Ok, I tracked down the culprit. The Method element in your tests and the example I provided above differ very slightly. The namespace for the web service ends with a '/', which was mssing from in your query. This caused the method portion of the soap request sent to the server to exist in a different namespace than was expected, which caused it to be interpreted as null.

To reslove this issue, append a '/' to end of the Namespace attribute value in the Method element.

Ian|||

Thanks a lot it worked.

Working Query is

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetList">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Announcements</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

Possible to use a Sharepoint List as a Datasource?

In Reporting Services 2005, is it possible to create a data connection to a sharepoint list? If so, what connection type and connection string do i use for this?It is possible using the Xml Data processing extension. Sharepoint exposes a Lists.asmx webservice, which can be queried using the Xml data processing extension.

Connection String:
http://<YourServerName>/sites/sitename/_vti_bin/Lists.asmx

Xml Query:

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetList">
</Method>
<ElementPath IgnoreNamspaces="true">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

Dataset Parameter:
Name: listName, Value: The name of the list you want from the site.

Notes:
You may need to play with the ElementPath to get what you need. See this page for more information: http://msdn2.microsoft.com/en-us/library/ms365158.aspx|||

This is good as I have this exact requirement, but get

TITLE: Microsoft Report Designer

An error occurred while executing the query.
Failed to execute web request for the specified URL.


ADDITIONAL INFORMATION:

Failed to execute web request for the specified URL. (Microsoft.ReportingServices.DataExtensions)

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was thrown.</faultstring>
<detail>
<errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Value cannot be null.</errorstring>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>


BUTTONS:

OK

Any ideas

|||

I would suggest that you use the informations provided by Teun Duynstee in this link:

http://www.teuntostring.net/blog/2005/09/reporting-over-sharepoint-lists-with.html

Cheers
Markus

|||The

error that you are getting for the GetList method is most likely caused

by not using the correct name of the list. The listName must be either the

title or the GUID for the list.

For more info on this method http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/soapmListsGetList_SV01034346.asp

|||

Hi,

In case you are interested we are selling a reporting services (both 2000 and 2005 version) data extension for sharepoint.

This extension makes it possible to build report using sharepoint lists (including libraries).

Several lists may be joined using SQL-like operators.

Reports parameters may be used with the query string.

An evaluation version is available on our site at http://www.enesyssoftware.com/Default.aspx?tabid=56

If you prefer to do it by yourself, the article from Teun Duynstee is the way to go.

Frdric LATOUR

http://www.enesyssoftware.com

|||

Hi,

I have the same requirement of getting the data from List in SharePoint 2007. It exposed the method GetList(). I am using the same code which you have mentioned. But is not working.

Reporting Service SP 2 provide XML DataSource

Can you please rectify where i am going wrong. I have a List by name say: Announcements

How to Specify List Name and Where? I am unable to undertand your Dataset Parameter.

Dataset Parameter:
Name: listName, Value: The name of the list you want from the site.

I tried few combinations.

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/Announcements</ElementPath>
</Query>

Please help. As this will save me from writing DATA Extensions for my reports integration with sharepoint 2007

|||There are two ways to specify parameters for an Xml Data Processing Extension query.

1. Use the Reporting Services Dataset query parameters collection.

Add a query parameter to the dataset with the name 'listName' and value 'Announcements'.

2. Add the parameters directly to the Xmlk query, using the Parameters Xml element, which is a child of the Method element.

Add the following Xml as the child element to the Method element in the query above.

<Parameters>
<Parameter Name="listName">
<DefaultValue>Announcements</DefaultValue>
</Parameter>
</Parameters>

Ian|||

Hi,

I tried as you said now my query is. Previoisly i was not in sharepoint integration mode. so i was giving another error. Now i am getting the error as "Error While reading XML reponse"

My Data Source is:
http://localhost/Docs/vti_bin/Lists.asmx

My Query is :
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
<Parameters>
<Parameter Name="listName" Type="String">
<DefaultValue>Announcements</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath>GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

My Web Service is :

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetListResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<GetListResult>
<xsd:schema>schema</xsd:schema>xml</GetListResult>
</GetListResponse>
</soap12:Body>
</soap12:Envelope>

I have tried all combinations. 1) Isn't there any tool where i can construct this query 2) I am not able to view the dataset result in XML, so that i can map it with <ElementPath>. I am not able to test webservice with this "http://localhost/Docs/_vti_bin/Lists.asmx?op=GetList" URL, to view the dataset result.

|||
The exception you see being thrown is usually a wrapped exception that occurs in the call in the request/response phase, most likely a permissions issue. Check the log files for more information about this exception.

Also, regarding the ElementPath:

Try setting the IgnoreNamespaces attribute to true on the ElementPath element:

<ElementPath IgnoreNamespaces="true">

Answers to your questions:

1. Unfortunately, no, there is no tool at this time.
2. After you set the attribute mentioned above, try making the ElementPath less restrictive and to return the Xml as is. For example, this will return one field containing the raw Xml of the GetListResult element. You can use this to information see what the elements are in the GetListResult.

<ElementPath IgnoreNamespaces="true">GetListResponse{GetListResult(XML)}</ElementPath>

Ian|||

Hi,

This time i tried all below combionations bit its still not working. I have wasted lot of effots on this and this is very important for me to get it solved.

ERROR its Gives in Log is
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring><detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Value cannot be null.</errorstring></detail></soap:Fault></soap:Body></soap:Envelope>

http://localhost/_vti_bin/Lists.asmx

GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Name="GetList" Namespace= "http://schemas.microsoft.com/sharepoint/soap">
<Parameters>
<Parameter Name="listName">
<DefaultValue>21CF03AF-3A7E-479C-98E0-CBE0F16A594A</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">GetListResponse{GetListResult(XML)}</ElementPath>
</Query>

WithOut GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Name="GetList" Namespace= "http://schemas.microsoft.com/sharepoint/soap">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Contacts</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">GetListResponse{GetListResult(XML)}</ElementPath>
</Query>

GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
<Parameters>
<Parameter Name="listName">
<DefaultValue>21CF03AF-3A7E-479C-98E0-CBE0F16A594A</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>


WithOut GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Contacts</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

Please Help!!!

|||Ok, I tracked down the culprit. The Method element in your tests and the example I provided above differ very slightly. The namespace for the web service ends with a '/', which was mssing from in your query. This caused the method portion of the soap request sent to the server to exist in a different namespace than was expected, which caused it to be interpreted as null.

To reslove this issue, append a '/' to end of the Namespace attribute value in the Method element.

Ian|||

Thanks a lot it worked.

Working Query is

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetList">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Announcements</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

Possible to use a Sharepoint List as a Datasource?

In Reporting Services 2005, is it possible to create a data connection to a sharepoint list? If so, what connection type and connection string do i use for this?It is possible using the Xml Data processing extension. Sharepoint exposes a Lists.asmx webservice, which can be queried using the Xml data processing extension.

Connection String:
http://<YourServerName>/sites/sitename/_vti_bin/Lists.asmx

Xml Query:

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetList">
</Method>
<ElementPath IgnoreNamspaces="true">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

Dataset Parameter:
Name: listName, Value: The name of the list you want from the site.

Notes:
You may need to play with the ElementPath to get what you need. See this page for more information: http://msdn2.microsoft.com/en-us/library/ms365158.aspx|||

This is good as I have this exact requirement, but get

TITLE: Microsoft Report Designer

An error occurred while executing the query.
Failed to execute web request for the specified URL.


ADDITIONAL INFORMATION:

Failed to execute web request for the specified URL. (Microsoft.ReportingServices.DataExtensions)

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was thrown.</faultstring>
<detail>
<errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Value cannot be null.</errorstring>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>


BUTTONS:

OK

Any ideas

|||

I would suggest that you use the informations provided by Teun Duynstee in this link:

http://www.teuntostring.net/blog/2005/09/reporting-over-sharepoint-lists-with.html

Cheers
Markus

|||The

error that you are getting for the GetList method is most likely caused

by not using the correct name of the list. The listName must be either the

title or the GUID for the list.

For more info on this method http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/soapmListsGetList_SV01034346.asp

|||

Hi,

In case you are interested we are selling a reporting services (both 2000 and 2005 version) data extension for sharepoint.

This extension makes it possible to build report using sharepoint lists (including libraries).

Several lists may be joined using SQL-like operators.

Reports parameters may be used with the query string.

An evaluation version is available on our site at http://www.enesyssoftware.com/Default.aspx?tabid=56

If you prefer to do it by yourself, the article from Teun Duynstee is the way to go.

Frdric LATOUR

http://www.enesyssoftware.com

|||

Hi,

I have the same requirement of getting the data from List in SharePoint 2007. It exposed the method GetList(). I am using the same code which you have mentioned. But is not working.

Reporting Service SP 2 provide XML DataSource

Can you please rectify where i am going wrong. I have a List by name say: Announcements

How to Specify List Name and Where? I am unable to undertand your Dataset Parameter.

Dataset Parameter:
Name: listName, Value: The name of the list you want from the site.

I tried few combinations.

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/Announcements</ElementPath>
</Query>

Please help. As this will save me from writing DATA Extensions for my reports integration with sharepoint 2007

|||There are two ways to specify parameters for an Xml Data Processing Extension query.

1. Use the Reporting Services Dataset query parameters collection.

Add a query parameter to the dataset with the name 'listName' and value 'Announcements'.

2. Add the parameters directly to the Xmlk query, using the Parameters Xml element, which is a child of the Method element.

Add the following Xml as the child element to the Method element in the query above.

<Parameters>
<Parameter Name="listName">
<DefaultValue>Announcements</DefaultValue>
</Parameter>
</Parameters>

Ian|||

Hi,

I tried as you said now my query is. Previoisly i was not in sharepoint integration mode. so i was giving another error. Now i am getting the error as "Error While reading XML reponse"

My Data Source is:
http://localhost/Docs/vti_bin/Lists.asmx

My Query is :
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
<Parameters>
<Parameter Name="listName" Type="String">
<DefaultValue>Announcements</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath>GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

My Web Service is :

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetListResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<GetListResult>
<xsd:schema>schema</xsd:schema>xml</GetListResult>
</GetListResponse>
</soap12:Body>
</soap12:Envelope>

I have tried all combinations. 1) Isn't there any tool where i can construct this query 2) I am not able to view the dataset result in XML, so that i can map it with <ElementPath>. I am not able to test webservice with this "http://localhost/Docs/_vti_bin/Lists.asmx?op=GetList" URL, to view the dataset result.

|||
The exception you see being thrown is usually a wrapped exception that occurs in the call in the request/response phase, most likely a permissions issue. Check the log files for more information about this exception.

Also, regarding the ElementPath:

Try setting the IgnoreNamespaces attribute to true on the ElementPath element:

<ElementPath IgnoreNamespaces="true">

Answers to your questions:

1. Unfortunately, no, there is no tool at this time.
2. After you set the attribute mentioned above, try making the ElementPath less restrictive and to return the Xml as is. For example, this will return one field containing the raw Xml of the GetListResult element. You can use this to information see what the elements are in the GetListResult.

<ElementPath IgnoreNamespaces="true">GetListResponse{GetListResult(XML)}</ElementPath>

Ian|||

Hi,

This time i tried all below combionations bit its still not working. I have wasted lot of effots on this and this is very important for me to get it solved.

ERROR its Gives in Log is
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring><detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Value cannot be null.</errorstring></detail></soap:Fault></soap:Body></soap:Envelope>

http://localhost/_vti_bin/Lists.asmx

GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Name="GetList" Namespace= "http://schemas.microsoft.com/sharepoint/soap">
<Parameters>
<Parameter Name="listName">
<DefaultValue>21CF03AF-3A7E-479C-98E0-CBE0F16A594A</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">GetListResponse{GetListResult(XML)}</ElementPath>
</Query>

WithOut GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Name="GetList" Namespace= "http://schemas.microsoft.com/sharepoint/soap">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Contacts</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">GetListResponse{GetListResult(XML)}</ElementPath>
</Query>

GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
<Parameters>
<Parameter Name="listName">
<DefaultValue>21CF03AF-3A7E-479C-98E0-CBE0F16A594A</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>


WithOut GUID
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap" Name="GetList">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Contacts</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

Please Help!!!

|||Ok, I tracked down the culprit. The Method element in your tests and the example I provided above differ very slightly. The namespace for the web service ends with a '/', which was mssing from in your query. This caused the method portion of the soap request sent to the server to exist in a different namespace than was expected, which caused it to be interpreted as null.

To reslove this issue, append a '/' to end of the Namespace attribute value in the Method element.

Ian|||

Thanks a lot it worked.

Working Query is

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetList</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetList">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Announcements</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">GetListResponse{}/GetListResult{}/List/Fields/Field</ElementPath>
</Query>

Friday, March 9, 2012

Possible to join results from two seperate datasets?

If I have two datasources, one pointing to Oracle and another pointing to
SQL Svr and consequently, two datasets (one from each datasource); is it
possible to create a third dataset from the two or somehow combine the two
into a single table?
Thanks,
JamesYou need to use subreports. Note that you can put a subreport into a cell of
the table control. But also note, the subreport gets executed for each row.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"James" <jptyree@.duke-energy.com> wrote in message
news:%23U92zmSVHHA.1200@.TK2MSFTNGP04.phx.gbl...
> If I have two datasources, one pointing to Oracle and another pointing to
> SQL Svr and consequently, two datasets (one from each datasource); is it
> possible to create a third dataset from the two or somehow combine the two
> into a single table?
> Thanks,
> James
>|||I'm trying to figure my way through this, but it just isn't that
intuitive. Would you possibly have a simple example that you could
share?
Thanks.
--|||A subreport is a regular report with parameters. Design each report and test
independently. Then drag and drop the subreport onto the main report. Then
do a right mouse click on the subreport, properties and map the subreport
properties to a field in your dataset (you can also map to the main report
parameters, an expression, etc). I suggest trying something simple first.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"James" <jptyree@.duke-energy.com> wrote in message
news:%23rozAGcVHHA.5092@.TK2MSFTNGP03.phx.gbl...
> I'm trying to figure my way through this, but it just isn't that
> intuitive. Would you possibly have a simple example that you could
> share?
> Thanks.
> --
>|||Bruce L-C [MVP] wrote:
> A subreport is a regular report with parameters. Design each report
> and test independently. Then drag and drop the subreport onto the
> main report. Then do a right mouse click on the subreport, properties
> and map the subreport properties to a field in your dataset (you can
> also map to the main report parameters, an expression, etc). I
> suggest trying something simple first.
I guess the part that's confusing me is, to design what will be the sub
report, I need to create a dataset that that report will use. I design
the report, test it and once I'm happy with it, drag it onto my main
report so that it because an actual subreport. Then, define the
parameters that it will receive from the main report, whether that be
values that are parameters that the main report receives from user
input or data from the datasets the main report uses. I don't see how
that will allow me to join/combine the two datasets that the main
report has (One populated from Oracle and the other from SQL) and
populate a single table in the subreport. Am I totally missing the
obvious'
My issue is our HR department has a user table with employee id's and
user names and other info and another department has a table that just
has employee id's but no other user info. I need to pull user info
from Oracle and Project info from SQL and join the two into a single
table based on the employee id. When I'm designing what will become
the subreport with the two datasets combined... what am I using as a
dataset at design time?
I appreciate your time and effort in helping me work through this!
--|||Yes, you are missing the point. You have one report with the Oracle dataset
and the other report has the SQL dataset. Your choice which is the main
report and which is the subreport. Design each report independently with the
appropriate parameters and test it.
Subreports are how you handle a join like this(1-many or 1-1).
OK, so in your case have the Oracle user info be the main report. Design and
test the report. Then have another report using the SQL dataset with a
parameter of employee ID. Test the second report by running it and giving it
the employee id. Then do as I mentioned before.
In this case I would suggest using the list control in the main report. A
table control in the report that will be the subreport.
This is a classic one to many, employee information and then multiple
records of the project info.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"James" <jptyree@.duke-energy.com> wrote in message
news:OtZ$GfdVHHA.4076@.TK2MSFTNGP05.phx.gbl...
> Bruce L-C [MVP] wrote:
>> A subreport is a regular report with parameters. Design each report
>> and test independently. Then drag and drop the subreport onto the
>> main report. Then do a right mouse click on the subreport, properties
>> and map the subreport properties to a field in your dataset (you can
>> also map to the main report parameters, an expression, etc). I
>> suggest trying something simple first.
> I guess the part that's confusing me is, to design what will be the sub
> report, I need to create a dataset that that report will use. I design
> the report, test it and once I'm happy with it, drag it onto my main
> report so that it because an actual subreport. Then, define the
> parameters that it will receive from the main report, whether that be
> values that are parameters that the main report receives from user
> input or data from the datasets the main report uses. I don't see how
> that will allow me to join/combine the two datasets that the main
> report has (One populated from Oracle and the other from SQL) and
> populate a single table in the subreport. Am I totally missing the
> obvious'
> My issue is our HR department has a user table with employee id's and
> user names and other info and another department has a table that just
> has employee id's but no other user info. I need to pull user info
> from Oracle and Project info from SQL and join the two into a single
> table based on the employee id. When I'm designing what will become
> the subreport with the two datasets combined... what am I using as a
> dataset at design time?
> I appreciate your time and effort in helping me work through this!
> --
>|||Bruce L-C [MVP] wrote:
> Yes, you are missing the point. You have one report with the Oracle
> dataset and the other report has the SQL dataset. Your choice which
> is the main report and which is the subreport. Design each report
> independently with the appropriate parameters and test it.
> Subreports are how you handle a join like this(1-many or 1-1).
> OK, so in your case have the Oracle user info be the main report.
> Design and test the report. Then have another report using the SQL
> dataset with a parameter of employee ID. Test the second report by
> running it and giving it the employee id. Then do as I mentioned
> before.
> In this case I would suggest using the list control in the main
> report. A table control in the report that will be the subreport.
> This is a classic one to many, employee information and then multiple
> records of the project info.
Now it makes sense. Thanks!
--|||Its possible to use a linked server (to oracle database) to run the query
via SQL Server and reference tables in each database as part of a single
query. Users can also be granted access/mapped to oracle users.
"James" <jptyree@.duke-energy.com> wrote in message
news:eO4F5neVHHA.528@.TK2MSFTNGP03.phx.gbl...
> Bruce L-C [MVP] wrote:
>> Yes, you are missing the point. You have one report with the Oracle
>> dataset and the other report has the SQL dataset. Your choice which
>> is the main report and which is the subreport. Design each report
>> independently with the appropriate parameters and test it.
>> Subreports are how you handle a join like this(1-many or 1-1).
>> OK, so in your case have the Oracle user info be the main report.
>> Design and test the report. Then have another report using the SQL
>> dataset with a parameter of employee ID. Test the second report by
>> running it and giving it the employee id. Then do as I mentioned
>> before.
>> In this case I would suggest using the list control in the main
>> report. A table control in the report that will be the subreport.
>> This is a classic one to many, employee information and then multiple
>> records of the project info.
> Now it makes sense. Thanks!
> --
>