Welcome to MSDN Blogs Sign in | Join | Help

Syndication

News

All my posts are provided "AS IS" with no warranties, and confer no rights.

Where are my readers?


Other blogs from my colleages

Querying SharePoint List from Reporting Services returns only “not null” columns

 

Querying to a Sharepoint List from a report in Reporting Services 2005 returns only the columns that contain data. If any of the columns is NULL, they are not returned.

This behavior is due to the Auto derivation the XMLDP: When there is an empty value for the 1st row, the column is not displayed.

 

This is fixed for the next version of Reporting Services (Katmai). For the moment you can use the following workaround, specifying all the columns explicitly (@Column1,@Column2,@Column3,@Column4,@column5,@column6,@column7):

 

<Query>

    <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">

        <Parameters>

            <Parameter Name="listName">

                <DefaultValue>SomeListName</DefaultValue>

            </Parameter>

            <Parameter Name="viewName">

                <DefaultValue>{d99b0402-38b9-48a5-87e9-2c6bf198a30c}</DefaultValue>

            </Parameter>

        </Parameters>

    </Method>

    <ElementPath IgnoreNamespaces="true">GetListItemsResponse/GetListItemsResult/listitems/data/row{@Column1,@Column2,@Column3,@Column4,@column5,@column6,@column7}</ElementPath>

    <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>

</Query>

 

 

Maria Esteban

Ingeniero de Soporte de Reporting Services

Published Thursday, December 13, 2007 5:47 PM by mariae

Comments

# Links (12/13/2007) &laquo; Steve Pietrek&#8217;s SharePoint Stuff @ Thursday, December 13, 2007 8:46 PM

PingBack from http://stevepietrekweblog.wordpress.com/2007/12/13/links-12132007/

Links (12/13/2007) « Steve Pietrek’s SharePoint Stuff

# re: Querying SharePoint List from Reporting Services returns only “not null” columns @ Wednesday, March 25, 2009 4:40 PM

Has anyone figured out how to specify columns that have a space in the column name?  I've tried using underscore instead of space, wrapping the field in single quotes, wrapping the field in double quotes, wrapping the field in square brackets...all to no avail.  

cneiger

# re: Querying SharePoint List from Reporting Services returns only “not null” columns @ Friday, May 29, 2009 1:35 PM

cneiger,

have you tried using _x0020_ in place of the space?

MichealHunt

# re: Querying SharePoint List from Reporting Services returns only “not null” columns @ Tuesday, August 18, 2009 6:08 AM

Hi I am Querying over Infopath forms Library, I am not able to get any data for the columns present in Form.

Iam able to get the data when the column is in List.

Please suggest how to do for SSRS Sharepoint over Infopath Forms..

Thanks in advance

rakesh.micro

Anonymous comments are disabled
Page view tracker