Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

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.
RSDataExtensionXml_demo.zip
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
using System;
using Microsoft.ReportingServices.DataProcessing;
using System.Collections;
using System.Globalization;
using System.Diagnostics;

namespace CustomDataExtension
{
   /*
   * Because IDataParameterCollection is primarily an IList,
   * the sample can use an existing class for most of the implementation.
   * In this sample, we use ArrayList. 
   */
   public class DataSetParameterCollection : ArrayList, IDataParameterCollection, IDisposable
   {
		public object this[string index] 
		{
			get
		{
			return this[IndexOf(index)];
		}
			set
			{
				this[IndexOf(index)] = value;
			}
		}
		/// <summary>
		/// Helper wrapper to get a parameter by name
		/// </summary>
		/// <param name="parameterName"></param>
		/// <returns></returns>
		public DataSetParameter GetByName(string parameterName)
		{
			DataSetParameter parameter = null;
			IEnumerator enumerator = this.GetEnumerator();
			while (enumerator.MoveNext())
			{
				DataSetParameter tempParameter = (DataSetParameter) enumerator.Current;
				if (tempParameter.ParameterName == parameterName) 
				{
					parameter = tempParameter;
					break;
				}
			}
			return parameter;
		}

		public int Add(IDataParameter value)
		{
			Trace.WriteLine("DataSet Extension: Add(IDataParameter value");
			if (((DataSetParameter)value).ParameterName != null)
			{
				return base.Add(value);
			}
			else
				throw new ArgumentException("parameter must be named");
		}

 
	   public override int Add(object value)
	   {
		   Trace.WriteLine("Add value" + value.ToString());
		   return Add((IDataParameter)value);
	   }

	   /// <summary>
	   /// Dispose of any held resources
	   /// </summary>
		public void Dispose() 
		{
			DataSetParameter parameter = null;
			IEnumerator enumerator = this.GetEnumerator();
			while (enumerator.MoveNext())
			{
				parameter = (DataSetParameter) enumerator.Current;
				parameter.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.

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