anouar.bagari
anouar.bagari

Reputation: 2104

reporting services and custom datasource

I'm new to reporting services and ask for the possibily of using custom object as datasource? i'm using asp.net, visual web developer 2008 express edition and c#, if yes can you give an example. thanks for help

Upvotes: 1

Views: 3237

Answers (2)

JamieSee
JamieSee

Reputation: 13030

You can't use POCO as a data source directly in reporting services. There are a few ways to do this.

The simplest it to save your data to a database and query the database.

You could serialize the object to XML and query that by either including the XML directly into your query in an <XmlData> element, or calling a web service to retrieve the XML.

Create an XML Data Source for a Web Service

  1. In your report project, right click on the Shared Data Sources folder.
  2. Select Add New Data Source.
  3. Set the Name to use.
  4. Set the Type to XML.
  5. Set the connection string to http://MyWebServer/MyWebServiceEndpoint.asmx.
  6. Go to the Credentials page.
  7. Configure the authentication.
  8. Click OK.

You'll need to examine the WSDL for the web service and see the following references to help you build the query:

  1. Reporting Services: Using XML and Web Service Data Sources
  2. XML Query Syntax for XML Report Data (SSRS)
  3. Element Path Syntax for XML Report Data (SSRS)

Upvotes: 2

Jeremy
Jeremy

Reputation: 9030

Here's a list of supported data sources from msdn: Data Sources

You would simply add a shared data source to your project (example: MyDataSource.rds) and choose from the available types. There, you would simply supply the appropriate credentials. Each of your reports would use the data source.

EDIT

Here's a simple tutorial on adding a data source: Creating a Shared Data Source in Reporting Services

Upvotes: 0

Related Questions