Click here to Skip to main content
11,495,371 members (66,355 online)
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 64.5K 342 26
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
#region Disclaimer by Teo Lachev "Microsoft Reporting Services in Action"
/*============================================================================
  File:     FormatListboxTypeEditor.cs

  Summary:  This class is an abstract class for a Listbox UITypeEditor.
--------------------------------------------------------------------
  The AwReportViewer sample was built upon on the Microsoft's ReportViewer control included 
  with the RS samples.
 
  The following portions of the code have been changed/added to fit the book needs:
  1. Nothing was changed
    
===========================================================================*/
#endregion

using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Design;
using System.Windows.Forms;
using System.Windows.Forms.ComponentModel;
using System.Windows.Forms.Design;
using System.Collections;

namespace RSControl.WebViewer
{
	public abstract class ListboxTypeEditor : UITypeEditor
	{
		#region Private Member Variables
		private IWindowsFormsEditorService _formEditorService = null;
		#endregion
		
		protected abstract void FillInList(ITypeDescriptorContext context, IServiceProvider provider, ListBox listBox);

		/// <summary>
		/// Create a drop down list box.
		/// </summary>
		/// <param name="context"></param>
		/// <returns></returns>
		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			if (context != null && context.Instance != null) 
			{
				return UITypeEditorEditStyle.DropDown;
			}
			return base.GetEditStyle(context);
		}
		
		/// <summary>
		/// Create the ListBox control for the property grid.
		/// </summary>
		/// <param name="context"></param>
		/// <param name="provider"></param>
		/// <param name="newValue"></param>
		/// <returns></returns>
		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object newValue)
		{
			if (context != null
				&& context.Instance != null
				&& provider != null) 
				try
				{
					// get the editor service
					this._formEditorService = (IWindowsFormsEditorService)
						provider.GetService(typeof(IWindowsFormsEditorService));

					// create the control for the UI
					ListBox listBox = new ListBox();
					listBox.Click += new EventHandler(List_Click);
            
					// modify the control properties
					FillInList(context, provider, listBox);

					// set the list selection
					listBox.SelectedItem = newValue;
         
					// editor service renders control and manages control events
					this._formEditorService.DropDownControl(listBox);
   
					// return the updated newValue
					return listBox.SelectedItem;
				} 
				finally
				{
					this._formEditorService = null;
				}
			else
				return newValue;

		} 
		/// <summary>
		/// Handle click event.
		/// </summary>
		/// <param name="pSender"></param>
		/// <param name="pArgs"></param>
		protected void List_Click(object sender, EventArgs args)
		{
			this._formEditorService.CloseDropDown();
		} 
		
		
	}
}

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
Web04 | 2.8.150520.1 | Last Updated 19 Oct 2005
Article Copyright 2005 by Ken C. Len
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid