Click here to Skip to main content
12,629,569 members (31,957 online)
Click here to Skip to main content

Stats

68.6K views
357 downloads
26 bookmarked
Posted

A reporting service using SOAP calls passing XML to a Data Extension

, 19 Oct 2005 CPOL
Demostrates how to render a report by passing XML to a data extension via SOAP calls.
RSTestApp
CustomDataExtension
CustomDataExtension.csproj.user
Web References
BusinessService
BusinessData.disco
BusinessData.wsdl
Reference.map
Global.asax
RsReportViewer
AwReportViewer.suo
Design
vssver.scc
RsReportViewer.csproj.user
Web References
RS
Reference.map
ReportService.wsdl
RSTestApp.csproj.webinfo
RSTestReports
Northwind.rds
Northwind.udl
Report1.rdl
Report1.rdl.data
RSTest.rptproj.user
RSTestReports.rptproj
RSTestReports.rptproj.user
Sales Order Detail.rdl
Sales Order Detail.rdl.data
Territory Sales Drilldown.rdl
Territory Sales Drilldown.rdl.data
RSTestWS
Global.asax
RSTestWS.csproj.webinfo
temp
Web References
ReportServer
Reference.map
ReportService.wsdl
// File: DataSetConnection.cs

using System;
using System.Diagnostics;
using Data = System.Data;
using Microsoft.ReportingServices.DataProcessing;
using Microsoft.ReportingServices.Interfaces;

namespace CustomDataExtension
{
	/// <summary>
	/// </summary>
	public class DataSetConnection : IDbConnection, IExtension
	{
		#region Properties
		private string _connectionString;
		private System.Data.ConnectionState	_connectionState = System.Data.ConnectionState.Closed;
		private string _localizedName = "Custom Data Extension";

		/// <summary>
		/// Gets/sets the connection string
		/// </summary>
		/// <remarks>
		/// ToDo
		/// </remarks>
		public String ConnectionString 
		{
			get { return (this._connectionString); }
			set { this._connectionString = value; }
		}

		/// <summary>
		/// Gets the connection timeout.
		/// </summary>
		/// <remarks>
		/// This extension does not currently support a timeout so will always return 0.
		/// </remarks>
		public Int32 ConnectionTimeout 
		{
			get { return (0); }
		}

		/// <summary>
		/// TODO
		/// </summary>
		public System.Data.ConnectionState State 
		{
			get 
			{
				return _connectionState;
			}
		}

		/// <summary>
		/// TODO
		/// </summary>
		public string LocalizedName 
		{
			get { return _localizedName; }
			set { _localizedName = value; }
		}
		#endregion

		/// <summary>
		/// Signals the begin of a transaction
		/// </summary>
		/// <returns>null since we do not support transactions</returns>
		public IDbTransaction BeginTransaction () 
		{
			return (null);
		}

		/// <summary>
		/// Opens the connection (not used)
		/// </summary>
		public void Open () 
		{
			//Debug.WriteLine("Connection :: Open()");
		}

		/// <summary>
		/// Closes the connection (not used)
		/// </summary>
		public void Close () {}

		/// <summary>
		/// Creates a IDbCommand object
		/// </summary>
		/// <returns>A new IDbCommand</returns>
		public IDbCommand CreateCommand () 
		{
			//Debug.WriteLine("Connection :: CreateCommand()");
			return new DataSetCommand();
		}

		/// <summary>
		/// TODO
		/// </summary>
		/// <param name="configuration"></param>
		public void SetConfiguration(string configuration) {}

		/// <summary>
		/// Dispose of any held resources
		/// </summary>
		public void Dispose() {}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ken C. Len
Software Developer (Senior) LEN Associates Inc.
United States United States
Years of software consulting and software development using Microsoft development products such as Microsoft Content Management System, SQL Server Reporting Service, ASP.Net C# VB.Net, HTML and javascript web development, Visual Studio add-on development, C++ MFC/ATL and COM+ development, and ActiveX components.

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.161205.3 | Last Updated 19 Oct 2005
Article Copyright 2005 by Ken C. Len
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid