diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/ICSharpCode.Reporting.Addin.csproj b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/ICSharpCode.Reporting.Addin.csproj
index 6446187b3d..48fbf93a33 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/ICSharpCode.Reporting.Addin.csproj
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/ICSharpCode.Reporting.Addin.csproj
@@ -91,9 +91,11 @@
     <Compile Include="src\Designer\RootReportModel.cs" />
     <Compile Include="src\Designer\SectionDesigner.cs" />
     <Compile Include="src\Globals\DesignerGlobals.cs" />
+    <Compile Include="src\Globals\StringWriterWithEncoding.cs" />
     <Compile Include="src\Services\DefaultMemberRelationshipService.cs" />
     <Compile Include="src\Services\DesignerSerializationService.cs" />
     <Compile Include="src\Services\MenuCommandService.cs" />
+    <Compile Include="src\Services\NameCreationService.cs" />
     <Compile Include="src\Services\TypeDiscoveryService.cs" />
     <Compile Include="src\Services\TypeResolutionService.cs" />
     <Compile Include="src\Services\DefaultServiceContainer.cs" />
@@ -101,7 +103,10 @@
     <Compile Include="src\Services\ToolboxService.cs" />
     <Compile Include="src\Services\UIService.cs" />
     <Compile Include="src\Views\DesignerView.cs" />
+    <Compile Include="src\XML\MycroWriter.cs" />
     <Compile Include="src\XML\ReportDefinitionParser.cs" />
+    <Compile Include="src\XML\ReportDesignerWriter.cs" />
+    <Compile Include="src\XML\XmlHelper.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="EmptyReport.xft">
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs
index b71201ec1f..578dfd3b89 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs
@@ -27,7 +27,7 @@ namespace ICSharpCode.Reporting.Addin.DesignableItems
 		}
 		
 		
-		[System.ComponentModel.EditorBrowsableAttribute()]
+		[EditorBrowsableAttribute()]
 		protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
 		{
 			base.OnPaint(e);
@@ -37,6 +37,7 @@ namespace ICSharpCode.Reporting.Addin.DesignableItems
 		
 		public  override void Draw(Graphics graphics)
 		{
+			Console.WriteLine("Draw section");
 			base.DrawControl(graphics,Rectangle.Inflate(this.ClientRectangle,-2,-2));
 		}
 	
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Designer/ReportRootDesigner.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Designer/ReportRootDesigner.cs
index 3a693c0761..804efd530c 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Designer/ReportRootDesigner.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Designer/ReportRootDesigner.cs
@@ -26,9 +26,8 @@ using System.Drawing.Design;
 using System.Drawing.Printing;
 using System.Windows.Forms;
 using System.Windows.Forms.Design;
-
 using ICSharpCode.Core;
-using ICSharpCode.Reporting.Items;
+using ICSharpCode.Reporting.Addin.DesignableItems;
 
 namespace ICSharpCode.Reporting.Addin.Designer
 {
@@ -39,18 +38,18 @@ namespace ICSharpCode.Reporting.Addin.Designer
 	public class ReportRootDesigner: DocumentDesigner
 	{
 		ICollection currentSelection;
-		private IDesignerHost host;
-		private MenuCommandService menuCommandService;
-		private IToolboxService	toolboxService;
-		private ISelectionService selectionService;
-		private IComponentChangeService componentChangeService;
-		private List<BaseSection> sections;
-		private ReportSettings reportSettings;
-		private RootReportModel rootReportModel;
+		IDesignerHost host;
+		 MenuCommandService menuCommandService;
+		IToolboxService	toolboxService;
+		ISelectionService selectionService;
+		IComponentChangeService componentChangeService;
+		List<BaseSection> sections;
+		ICSharpCode.Reporting.Items.ReportSettings reportSettings;
+		 RootReportModel rootReportModel;
 		
 		public ReportRootDesigner()
 		{
-			System.Console.WriteLine("Createb RootDesigner");
+			System.Console.WriteLine("Create RootDesigner");
 		}
 		
 
@@ -71,7 +70,7 @@ namespace ICSharpCode.Reporting.Addin.Designer
 		
 		private void InitializeGUI()
 		{
-			reportSettings = host.Container.Components[1] as ReportSettings;
+			reportSettings = host.Container.Components[1] as ICSharpCode.Reporting.Items.ReportSettings;
 			InitializeRootReportModel();
 		}
 		
@@ -187,17 +186,17 @@ namespace ICSharpCode.Reporting.Addin.Designer
 		
 		#region Events
 		
-		private void OnSectionSizeChanged (object sender, EventArgs e)
+		void OnSectionSizeChanged (object sender, EventArgs e)
 		{
-			this.RecalculateSections();
+			RecalculateSections();
 		}
 		
 		
-		private void RecalculateSections()
+		void RecalculateSections()
 		{
 			int locY = 50;
 			if (this.reportSettings == null) {
-				reportSettings = host.Container.Components[1] as ReportSettings;
+				reportSettings = host.Container.Components[1] as ICSharpCode.Reporting.Items.ReportSettings;
 			}
 			
 			foreach (BaseSection s in sections)
@@ -210,7 +209,7 @@ namespace ICSharpCode.Reporting.Addin.Designer
 		
 		
 		
-		private void OnLoadComplete(object sender, EventArgs e)
+		void OnLoadComplete(object sender, EventArgs e)
 		{
 			var host = (IDesignerHost)sender;
 			host.LoadComplete -= new EventHandler(this.OnLoadComplete);
@@ -220,7 +219,7 @@ namespace ICSharpCode.Reporting.Addin.Designer
 		
 		private void OnComponentAdded(object sender, ComponentEventArgs ce)
 		{
-			BaseSection section = ce.Component as BaseSection;
+			var section = ce.Component as BaseSection;
 			
 			if (section != null) {
 				this.sections.Add(section);
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Designer/SectionDesigner.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Designer/SectionDesigner.cs
index d5f9e467d2..bb4347bcd5 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Designer/SectionDesigner.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Designer/SectionDesigner.cs
@@ -56,7 +56,7 @@ namespace ICSharpCode.Reporting.Addin.Designer
 		protected override void OnDragDrop(DragEventArgs de)
 		{
 			base.OnDragDrop(de);
-			IToolboxService it = (IToolboxService)this.GetService(typeof(IToolboxService));
+			var it = (IToolboxService)this.GetService(typeof(IToolboxService));
 			it.SetSelectedToolboxItem(null);
 		}
 		
@@ -74,13 +74,13 @@ namespace ICSharpCode.Reporting.Addin.Designer
 		}
 		
 		
-		private void OnSelectionChanged(object sender, EventArgs e)
+		void OnSelectionChanged(object sender, EventArgs e)
 		{
 			Control.Invalidate( );
 		}
 		
 		
-		private void GetService ()
+		void GetService ()
 		{
 			selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
 			if (selectionService != null)
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/DesignerGenerator.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/DesignerGenerator.cs
index ebf7e94f97..4be70e5d79 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/DesignerGenerator.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/DesignerGenerator.cs
@@ -7,8 +7,14 @@
  * To change this template use Tools | Options | Coding | Edit Standard Headers.
  */
 using System;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Xml;
 using ICSharpCode.Core;
+using ICSharpCode.Reporting.Addin.DesignableItems;
+using ICSharpCode.Reporting.Addin.Globals;
 using ICSharpCode.Reporting.Addin.Views;
+using ICSharpCode.Reporting.Addin.XML;
 
 namespace ICSharpCode.Reporting.Addin.DesignerBinding
 {
@@ -46,7 +52,12 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
 		
 		public void MergeFormChanges(System.CodeDom.CodeCompileUnit unit)
 		{
-			throw new NotImplementedException();
+			System.Diagnostics.Trace.WriteLine("Generator:MergeFormChanges");
+			var writer = new StringWriterWithEncoding(System.Text.Encoding.UTF8);
+			var xml = XmlHelper.CreatePropperWriter(writer);
+			InternalMergeFormChanges(xml);
+			Console.WriteLine(writer.ToString());
+			viewContent.ReportFileContent = writer.ToString();
 		}
 		
 		public bool InsertComponentEvent(System.ComponentModel.IComponent component, System.ComponentModel.EventDescriptor edesc, string eventMethodName, string body, out string file, out int position)
@@ -66,5 +77,37 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
 		}
 		
 		#endregion
+		
+		void InternalMergeFormChanges(XmlTextWriter xml)
+		{
+			if (xml == null) {
+				throw new ArgumentNullException("xml");
+			}
+			
+			var rpd = new ReportDesignerWriter();
+			XmlHelper.CreatePropperDocument(xml);
+			
+			foreach (IComponent component in viewContent.Host.Container.Components) {
+				if (!(component is Control)) {
+					rpd.Save(component,xml);
+				}
+			}
+			xml.WriteEndElement();
+			xml.WriteStartElement("SectionCollection");
+			
+			// we look only for Sections
+			foreach (var component in viewContent.Host.Container.Components) {
+				var b = component as BaseSection;
+				if (b != null) {
+					rpd.Save(component,xml);
+				}
+			}
+			//SectionCollection
+			xml.WriteEndElement();
+			//Reportmodel
+			xml.WriteEndElement();
+			xml.WriteEndDocument();
+			xml.Close();
+		}
 	}
 }
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/InternalReportLoader.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/InternalReportLoader.cs
index b7930b35ad..04ace3ecfe 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/InternalReportLoader.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/InternalReportLoader.cs
@@ -56,22 +56,19 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
 			this.stream = stream;
 		}
 		
-		public void LoadOrCreateReport()
+		public ReportModel LoadOrCreateReport()
 		{
 			Console.WriteLine("LoadOrCreateReport()");
 			Application.UseWaitCursor = true;
-			try {
-				var component = this.host.CreateComponent(typeof(RootReportModel),"RootReportModel");
-				var rootControl = component as RootReportModel;
-				UpdateStatusbar();
-				ReportModel = CreateNamedSurface();
-				rootControl.Size = this.ReportModel.ReportSettings.PageSize;
-				
-			} catch (Exception e) {
-				MessageService.ShowException(e,"LoadOrCreateReport");
-			} finally {
-				Application.UseWaitCursor = false;
-			}
+			ReportModel reportModel = null;
+			
+			var rootComponent = host.CreateComponent(typeof(RootReportModel),"RootReportModel");
+			var rootControl = rootComponent as RootReportModel;
+			UpdateStatusbar();
+			reportModel = CreateNamedSurface();
+			rootControl.Size = reportModel.ReportSettings.PageSize;
+			Application.UseWaitCursor = false;
+			return reportModel;
 		}
 		
 		
@@ -89,12 +86,14 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
 		
 		ReportModel CreateNamedSurface ()
 		{
-			var deserializer = new ReportDefinitionDeserializer(host,stream);
-			return deserializer.LoadObjectFromFileDefinition();
+			var deserializer = new ReportDefinitionDeserializer(host);
+			var document = deserializer.LoadXmlFromStream(stream);
+			var reportModel = deserializer.CreateModelFromXml(document.DocumentElement);
+			return reportModel;
 		}
 		
 		
-		public ReportModel ReportModel {get; private set;}
+//		public ReportModel ReportModel {get; private set;}
 
 	}
 }
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDefinitionDeserializer.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDefinitionDeserializer.cs
index bbd6d53100..ee2f21aee7 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDefinitionDeserializer.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDefinitionDeserializer.cs
@@ -19,12 +19,13 @@
 using System;
 using System.ComponentModel.Design;
 using System.IO;
+using System.Reflection;
 using System.Xml;
 
 using ICSharpCode.Core;
+using ICSharpCode.Reporting.Factories;
 using ICSharpCode.Reporting.Items;
 using ICSharpCode.Reporting.Xml;
-using ICSharpCode.SharpDevelop.Workbench;
 using ICSharpCode.Reporting.Addin.XML;
 
 namespace ICSharpCode.Reporting.Addin.DesignerBinding
@@ -32,61 +33,43 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
 	class ReportDefinitionDeserializer : ReportDefinitionParser
 	{
 		IDesignerHost host;
-		ICSharpCode.Reporting.Addin.DesignableItems.ReportSettings reportSettings;
-		Stream stream;
 		
-		#region Constructor
-		
-		public ReportDefinitionDeserializer(IDesignerHost host,Stream stream)
+		public ReportDefinitionDeserializer(IDesignerHost host)
 		{
+			Console.WriteLine("ReportDefinitionDeserializer");
 			if (host == null) {
 				throw new ArgumentNullException("host");
 			}
-			if (stream == null) {
-				throw new ArgumentNullException("stream");
-			}
-			Console.WriteLine("ReportDefinitionDeserializer");
+		
 			this.host = host;
-			this.stream = stream;
 		}
 		
-		#endregion
-		
-		public ReportModel LoadObjectFromFileDefinition()
+		public XmlDocument LoadXmlFromStream(Stream stream)
 		{
-			Console.WriteLine("LoadObjectFromFileDefinition()");
+			Console.Write("LoadXml");
+			if (stream == null)
+				throw new ArgumentNullException("stream");
 			var xmlDocument = new XmlDocument();
-			xmlDocument.Load(this.stream);
-			if (xmlDocument.FirstChild.NodeType == XmlNodeType.XmlDeclaration)
-			{
-				XmlDeclaration xmlDeclaration = (XmlDeclaration)xmlDocument.FirstChild;
+			xmlDocument.Load(stream);
+			if (xmlDocument.FirstChild.NodeType == XmlNodeType.XmlDeclaration) {
+				var xmlDeclaration = (XmlDeclaration)xmlDocument.FirstChild;
 				xmlDeclaration.Encoding = "utf-8";
 			}
-			return LoadObjectFromXmlDocument(xmlDocument.DocumentElement);
+			return xmlDocument;
 		}
 		
 		
-		private ReportModel LoadObjectFromXmlDocument(XmlElement elem)
+		public ReportModel CreateModelFromXml(XmlElement elem)
 		{
-			Console.WriteLine("LoadObjectFromXmlDocumen)");
-			//ReportSettings
-			var file =(OpenedFile) host.GetService(typeof(OpenedFile));
+			Console.WriteLine("CreateModelFromXml");
 			
-			XmlNodeList nodes =  elem.FirstChild.ChildNodes;
-			var rse = (XmlElement) nodes[0];
+			var reportSettings = CreateReportSettings(elem);
+		
 //			var reportModel = new ReportModel();
-			// manipulate reportSettings if Filename differs
-			var modelLoader = new ModelLoader();
-			this.reportSettings = modelLoader.Load(rse) as ICSharpCode.Reporting.Addin.DesignableItems.ReportSettings;
+			var reportModel = ReportModelFactory.Create();
+			reportModel.ReportSettings = reportSettings;
 			
-			if (string.Compare(this.reportSettings.FileName, file.FileName, StringComparison.CurrentCulture) != 0) {
-				System.Diagnostics.Trace.WriteLine("LoadObjectFromXmlDocument - filename changed" );
-				this.reportSettings.FileName = file.FileName;
-			}
-			var reportModel = new ReportModel();
-//			reportModel.ReportSettings = this.reportSettings;
-			
-			host.Container.Add(this.reportSettings);
+			host.Container.Add(reportSettings);
 			
 			//Move to SectionCollection
 			XmlNodeList sectionList =  elem.LastChild.ChildNodes;
@@ -94,64 +77,32 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
 			foreach (XmlNode sectionNode in sectionList) {
 				try {
 					object o = this.Load(sectionNode as XmlElement,null);
-					BaseSection section = o as BaseSection;
-//					ConvertAbsolut2RelativePath(section.Controls,this.reportSettings.FileName);
-//					ConvertAbsolut2RelativePath(section,this.reportSettings.FileName);
-//					host.Container.Add(section);
+					var section = o as ICSharpCode.Reporting.Addin.DesignableItems.BaseSection;
+					host.Container.Add(section);
 				} catch (Exception e) {
 					MessageService.ShowException(e);
 				}
 			}
 			return reportModel;
 		}
+
 		
-		
-		
-		
-		private static void ConvertAbsolut2RelativePath (System.Windows.Forms.Control.ControlCollection controls, string fileName)
+		ReportSettings CreateReportSettings(XmlElement elem)
 		{
-			/*
-			foreach (Control control in controls) {
-				
-				if (control.Controls.Count > 0) {
-					ConvertAbsolut2RelativePath(control.Controls,fileName);
-				}
-				
-				BaseImageItem baseImageItem = control as BaseImageItem;
-				if (baseImageItem != null) {
-					baseImageItem.ReportFileName = fileName;
-					
-					if (Path.IsPathRooted(baseImageItem.ImageFileName)) {
-						Console.WriteLine("Absolut2RelativePath");
-						Console.WriteLine("Image Filename {0}",fileName);
-						Console.WriteLine("Image Filename {0}",baseImageItem.ImageFileName);
-						string d = ICSharpCode.Reports.Core.Globals.FileUtility.GetRelativePath(
-							Path.GetDirectoryName(fileName),
-							Path.GetDirectoryName(baseImageItem.ImageFileName));
-
-						baseImageItem.RelativeFileName = d + Path.DirectorySeparatorChar + Path.GetFileName(baseImageItem.ImageFileName);
-						Console.WriteLine("Rel Filename {0}",baseImageItem.RelativeFileName);
-					}
-				}
-			}
-			*/
+			XmlNodeList nodes = elem.FirstChild.ChildNodes;
+			var reportSettingsNode = (XmlElement)nodes[0];
+			var modelLoader = new ModelLoader();
+			return  modelLoader.Load(reportSettingsNode) as ReportSettings;
 		}
 		
 		
 		protected override Type GetTypeByName(string ns, string name)
 		{
-			Type t = typeof(BaseSection).Assembly.GetType(typeof(BaseSection).Namespace + "." + name);
+			var a = Assembly.GetExecutingAssembly();
+			Type t = a.GetType("ICSharpCode.Reporting.Addin.DesignableItems" + "." + name);
+//			Type t = typeof(BaseSection).Assembly.GetType(typeof(BaseSection).Namespace + "." + name);
+				
 			return t;
 		}
-		
-		/*
-		#region Properties
-		
-		public string ReportName {
-			get { return this.reportSettings.ReportName; }
-		}
-		
-		#endregion
-		*/
 	}
 }
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDesignerLoader.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDesignerLoader.cs
index 9a53a74b69..751c3d2e3e 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDesignerLoader.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDesignerLoader.cs
@@ -30,8 +30,7 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
 		
 		#region Constructors
 
-		public ReportDesignerLoader(IDesignerGenerator generator, Stream stream)		
-		{
+		public ReportDesignerLoader(IDesignerGenerator generator, Stream stream){
 			Console.WriteLine("ReportDesignerLoader:Ctor");
 			if (stream == null)
 				throw new ArgumentNullException("stream");
@@ -47,8 +46,7 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
 		
 		#region Overriden methods of BasicDesignerLoader
 		
-		public override void BeginLoad(IDesignerLoaderHost host)
-		{
+		public override void BeginLoad(IDesignerLoaderHost host){
 			LoggingService.Info("ReportDesignerLoader:BeginLoad"); 
 			if (host == null) {
 				throw new ArgumentNullException("host");
@@ -60,17 +58,13 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
 		}
 		
 		
-		protected override void PerformLoad(IDesignerSerializationManager serializationManager)
-		{
-			Console.WriteLine("PerformLoad -> no Code");
+		protected override void PerformLoad(IDesignerSerializationManager serializationManager){
 			var internalLoader = new InternalReportLoader(host,generator, stream);
-			internalLoader.LoadOrCreateReport();
-			reportModel = internalLoader.ReportModel;
+			reportModel = internalLoader.LoadOrCreateReport();
+//			reportModel = internalLoader.ReportModel;
 		}
-
-		
-		protected override void PerformFlush(IDesignerSerializationManager designerSerializationManager)
-		{
+ 
+		protected override void PerformFlush(IDesignerSerializationManager designerSerializationManager){
 			LoggingService.Info("ReportDesignerLoader:PerformFlush");
 			generator.MergeFormChanges((System.CodeDom.CodeCompileUnit)null);
 		}
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Globals/StringWriterWithEncoding.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Globals/StringWriterWithEncoding.cs
new file mode 100644
index 0000000000..ece8f2e807
--- /dev/null
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Globals/StringWriterWithEncoding.cs
@@ -0,0 +1,34 @@
+/*
+ * Created by SharpDevelop.
+ * User: Peter Forstmeier
+ * Date: 16.03.2014
+ * Time: 18:24
+ * 
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+using System;
+using System.Text;
+
+namespace ICSharpCode.Reporting.Addin.Globals
+{
+	/// <summary>
+	/// Description of StringWriterWithEncoding.
+	/// </summary>
+	class StringWriterWithEncoding:System.IO.StringWriter
+	{
+		private readonly Encoding encoding;
+		
+		public StringWriterWithEncoding(Encoding encoding)
+		{
+			if (encoding == null) {
+				throw new ArgumentNullException("encoding");
+			}
+			this.encoding = encoding;
+		}
+		
+		public override Encoding Encoding {
+			get { return encoding; }
+		}
+		
+	}
+}
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Services/NameCreationService.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Services/NameCreationService.cs
new file mode 100644
index 0000000000..01423cb4c3
--- /dev/null
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Services/NameCreationService.cs
@@ -0,0 +1,87 @@
+/*
+ * Created by SharpDevelop.
+ * User: Peter Forstmeier
+ * Date: 16.03.2014
+ * Time: 17:57
+ * 
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Design.Serialization;
+using System.Diagnostics;
+
+namespace ICSharpCode.Reporting.Addin.Services
+{
+	/// <summary>
+	/// Description of NameCreationService.
+	/// </summary>
+	public class NameCreationService: INameCreationService
+	{
+		public NameCreationService()
+		{
+		}
+
+		string INameCreationService.CreateName(IContainer container, Type type)
+		{
+			
+			var cc = container.Components;
+			int min = Int32.MaxValue;
+			int max = Int32.MinValue;
+			int count = 0;
+
+			for (int i = 0; i < cc.Count; i++)
+			{
+				var comp = cc[i] as Component;
+				if (comp.GetType() == type)
+				{
+					count++;
+
+					string name = comp.Site.Name;
+					if(name.StartsWith(type.Name,StringComparison.InvariantCultureIgnoreCase))
+					{
+						try
+						{
+							int value = Int32.Parse(name.Substring(type.Name.Length));
+
+							if (value < min)
+								min = value;
+
+							if (value > max)
+								max = value;
+						}
+                        catch (Exception ex)
+                        {
+                            Trace.WriteLine(ex.ToString());
+                        }
+                    }
+				}
+			}// for
+
+			if (count == 0)
+				return type.Name + "1";
+
+			else if (min > 1)
+			{
+				int j = min - 1;
+
+				return type.Name + j.ToString();
+			}
+			else 
+			{
+				int j = max + 1;
+
+				return type.Name + j.ToString();
+			}
+		}
+		
+		bool INameCreationService.IsValidName(string name)
+		{
+			return true;
+		}
+		void INameCreationService.ValidateName(string name)
+		{
+			return;
+		}
+	}
+}
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Views/DesignerView.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Views/DesignerView.cs
index afd8ebed3b..05c70393e5 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Views/DesignerView.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Views/DesignerView.cs
@@ -8,6 +8,7 @@
  */
 using System;
 
+using System.Collections;
 using System.ComponentModel.Design;
 
 using System.ComponentModel.Design.Serialization;
@@ -16,20 +17,25 @@ using System.IO;
 using System.Windows.Forms;
 using System.Windows.Forms.Design;
 using ICSharpCode.Core;
-using ICSharpCode.SharpDevelop.Gui;
 using ICSharpCode.SharpDevelop.Workbench;
+using ICSharpCode.Reporting.Addin.DesignableItems;
 using ICSharpCode.Reporting.Addin.DesignerBinding;
 using ICSharpCode.Reporting.Addin.Services;
+using ICSharpCode.SharpDevelop.Gui;
 
 namespace ICSharpCode.Reporting.Addin.Views
 {
 	/// <summary>
 	/// Description of the view content
 	/// </summary>
-	public class DesignerView : AbstractViewContent
+	public class DesignerView : AbstractViewContent,IHasPropertyContainer
 	{
 		readonly IDesignerGenerator generator;
 		bool unloading;
+		bool hasUnmergedChanges;
+		bool shouldUpdateSelectableObjects;
+		bool isFormsDesignerVisible;
+		string reportFileContent;
 		Panel panel;
 		ReportDesignerLoader loader;
 		DefaultServiceContainer defaultServiceContainer;
@@ -87,7 +93,32 @@ namespace ICSharpCode.Reporting.Addin.Views
 				//				throw new FormsDesignerLoadException(FormatLoadErrors(designSurface));
 				LoggingService.Error("designer not loaded");
 			}
-          
+			//-------------
+			
+			defaultServiceContainer.AddService(typeof(INameCreationService),new NameCreationService());
+			                                   
+			
+			var selectionService = (ISelectionService)this.designSurface.GetService(typeof(ISelectionService));
+			selectionService.SelectionChanged  += SelectionChangedHandler;
+			/*
+			undoEngine = new ReportDesignerUndoEngine(Host);
+			*/
+			var componentChangeService = (IComponentChangeService)this.designSurface.GetService(typeof(IComponentChangeService));
+			
+			
+			componentChangeService.ComponentChanged += OnComponentChanged;
+			componentChangeService.ComponentAdded   += OnComponentListChanged;
+			componentChangeService.ComponentRemoved += OnComponentListChanged;
+			componentChangeService.ComponentRename  += OnComponentListChanged;
+			
+			this.Host.TransactionClosed += TransactionClose;
+		
+			UpdatePropertyPad();
+	
+			hasUnmergedChanges = false;
+			
+			LoggingService.Info("Form Designer: END INITIALIZE");
+          //----------------
 			LoggingService.Info("ReportDesigner LoadDesigner_End");
 		}	
 
@@ -103,6 +134,7 @@ namespace ICSharpCode.Reporting.Addin.Views
 		
 		DefaultServiceContainer CreateAndInitServiceContainer()
 		{
+			LoggingService.Debug("ReportDesigner: CreateAndInitServiceContainer...");
 			var serviceContainer = new DefaultServiceContainer();
 			serviceContainer.AddService(typeof(IUIService), new UIService());
 			serviceContainer.AddService(typeof(IToolboxService),new ToolboxService());
@@ -113,6 +145,8 @@ namespace ICSharpCode.Reporting.Addin.Views
 		
 		void SetDesignerEvents()
 		{
+			LoggingService.Debug("ReportDesigner: SetDesignerEvents...");
+			
 			designSurface.Loading += DesignerLoading;
 			designSurface.Loaded += DesignerLoaded;
 			designSurface.Flushed += DesignerFlushed;
@@ -122,40 +156,158 @@ namespace ICSharpCode.Reporting.Addin.Views
 		
 		static WindowsFormsDesignerOptionService CreateDesignerOptions()
 		{
-			var designerOptionService = new System.Windows.Forms.Design.WindowsFormsDesignerOptionService();
+			LoggingService.Debug("ReportDesigner: CreateDesignerOptions...");
+			var designerOptionService = new WindowsFormsDesignerOptionService();
 			designerOptionService.Options.Properties.Find("UseSmartTags", true).SetValue(designerOptionService, true);
 			designerOptionService.Options.Properties.Find("ShowGrid", true).SetValue(designerOptionService, false);
 			designerOptionService.Options.Properties.Find("UseSnapLines", true).SetValue(designerOptionService, true);
 			return designerOptionService;
 		}
 	
+		#region ComponentChangeService
+		
+		void OnComponentChanged (object sender, ComponentChangedEventArgs e)
+		{
+//			BaseImageItem item = e.Component as BaseImageItem;
+//			
+//			if (item != null) {
+//				item.ReportFileName = this.loader.ReportModel.ReportSettings.FileName;
+//			}
+			
+			bool loading = this.loader != null && this.loader.Loading;
+			LoggingService.Debug("ReportDesignerView: ComponentChanged: " + (e.Component == null ? "<null>" : e.Component.ToString()) + ", Member=" + (e.Member == null ? "<null>" : e.Member.Name) + ", OldValue=" + (e.OldValue == null ? "<null>" : e.OldValue.ToString()) + ", NewValue=" + (e.NewValue == null ? "<null>" : e.NewValue.ToString()) + "; Loading=" + loading + "; Unloading=" + this.unloading);
+			if (!loading && !unloading) {
+				this.MakeDirty();
+			}
+//			MergeFormChanges();
+		}
+		
+		
+		void OnComponentListChanged(object sender, EventArgs e)
+		{
+			bool loading = this.loader != null && this.loader.Loading;
+			LoggingService.Debug("ReportDesigner: Component added/removed/renamed, Loading=" + loading + ", Unloading=" + this.unloading);
+			if (!loading && !unloading) {
+				shouldUpdateSelectableObjects = true;
+				MakeDirty();
+			}
+		}
+		
+		private void MakeDirty()
+		{
+			hasUnmergedChanges = true;
+			PrimaryFile.MakeDirty();
+		}
+		
+		#endregion
+		
+		#region SelectionService
+		
+		void SelectionChangedHandler(object sender, EventArgs args)
+		{
+			var ser = (ISelectionService)sender;
+			var it = ser.PrimarySelection as AbstractItem;
+			if (it != null) {
+				if (String.IsNullOrEmpty(it.Site.Name)) {
+					it.Site.Name = it.Name;
+				}
+			}
+//			UpdatePropertyPadSelection((ISelectionService)sender);
+		}
+		
+		#endregion
+		
+		#region Transaction
+		
+		void TransactionClose(object sender, DesignerTransactionCloseEventArgs e)
+		{
+			if (shouldUpdateSelectableObjects) {
+				// update the property pad after the transaction is *really* finished
+				// (including updating the selection)
+//				WorkbenchSingleton.SafeThreadAsyncCall(UpdatePropertyPad);
+				shouldUpdateSelectableObjects = false;
+			}
+		}
+		
+		#endregion
+		
+		
+		#region HasPropertyContainer implementation
+		
+		PropertyContainer propertyContainer = new PropertyContainer();
+		
+		public PropertyContainer PropertyContainer {
+			get {
+				return propertyContainer;
+			}
+		}
+		
+		
+		void UpdatePropertyPad()
+		{
+			if (isFormsDesignerVisible && Host != null) {
+				propertyContainer.Host = Host;
+				propertyContainer.SelectableObjects = Host.Container.Components;
+				var selectionService = (ISelectionService)this.designSurface.GetService(typeof(ISelectionService));
+				if (selectionService != null) {
+					UpdatePropertyPadSelection(selectionService);
+				}
+			}
+		}
+		
+		
+		void UpdatePropertyPadSelection(ISelectionService selectionService)
+		{
+			ICollection selection = selectionService.GetSelectedComponents();
+			object[] selArray = new object[selection.Count];
+			selection.CopyTo(selArray, 0);
+			propertyContainer.SelectedObjects = selArray;
+		}
+		
+		
+		#endregion
+		
 		#region DesignerEvents
 		
 		void DesignerLoading(object sender, EventArgs e)
 		{
-			LoggingService.Debug("ReportDesigner: DesignerLoader loading...");
+			LoggingService.Debug("ReportDesigner: Event > DesignerLoader loading...");
 			this.unloading = false;
 		}
 		
 		
 		void DesignerLoaded(object sender, LoadedEventArgs e)
 		{
-			LoggingService.Debug("ReportDesigner: DesignerLoaded...");
+			LoggingService.Debug("ReportDesigner: Event > DesignerLoaded...");
+			this.unloading = false;
+			
+			if (e.HasSucceeded) {
+
+				SetupDesignSurface();
+				isFormsDesignerVisible = true;
+				generator.MergeFormChanges(null);
+//				StartReportExplorer ();
+
+				LoggingService.Debug("FormsDesigner loaded, setting ActiveDesignSurface to " + this.designSurface.ToString());
+				designSurfaceManager.ActiveDesignSurface = this.designSurface;
+				UpdatePropertyPad();
+			}
 		}
 
 		void DesignerFlushed(object sender, EventArgs e)
 		{
-			LoggingService.Debug("ReportDesigner: DesignerFlushed");
+			LoggingService.Debug("ReportDesigner: Event > DesignerFlushed");
 		}
 
 		
 		void DesingerUnloading(object sender, EventArgs e)
 		{
-			LoggingService.Debug("ReportDesigner: DesignernUnloading...");
+			LoggingService.Debug("ReportDesigner: Event > DesignernUnloading...");
 		}
 		
 		#endregion
 		
+		
 		#region Design surface manager (static)
 		
 		static readonly DesignSurfaceManager designSurfaceManager = new DesignSurfaceManager();
@@ -167,6 +319,47 @@ namespace ICSharpCode.Reporting.Addin.Views
 		
 		#endregion
 		
+		#region IDesignerHost implementation
+		
+		public IDesignerHost Host {
+			get {
+				return this.designSurface.GetService(typeof(IDesignerHost)) as IDesignerHost;
+			}
+		}
+		
+		#endregion
+		
+		#region UI
+		
+		void SetupDesignSurface()
+		{
+			Control c = null;
+			c = designSurface.View as Control;
+			c.Parent = panel;
+			c.Dock = DockStyle.Fill;
+		}
+		
+		
+		void MergeFormChanges()
+		{
+			System.Diagnostics.Trace.WriteLine("View:MergeFormChanges()");
+			this.designSurface.Flush();
+			generator.MergeFormChanges(null);
+			LoggingService.Info("Finished merging form changes");
+			hasUnmergedChanges = false;
+		}
+		
+		
+		public string ReportFileContent {
+			get {
+				if (IsDirty) {
+					this.MergeFormChanges();
+				}
+				return this.reportFileContent; }
+			set { this.reportFileContent = value; }
+		}
+		
+		#endregion
 		
 		#region overrides
 		
@@ -193,18 +386,6 @@ namespace ICSharpCode.Reporting.Addin.Views
 			base.Load(file, stream);
 			LoadDesigner(stream);
 		}
-		
-		
-		/// <summary>
-		/// Cleans up all used resources
-		/// </summary>
-		public override void Dispose()
-		{
-			// TODO: Clean up resources in this method
-			// Control.Dispose();
-			base.Dispose();
-		}
-		
 		#endregion
 	}
 	
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/MycroWriter.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/MycroWriter.cs
new file mode 100644
index 0000000000..5db3ffea39
--- /dev/null
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/MycroWriter.cs
@@ -0,0 +1,89 @@
+/*
+ * Created by SharpDevelop.
+ * User: Peter Forstmeier
+ * Date: 16.03.2014
+ * Time: 18:31
+ * 
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Reflection;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace ICSharpCode.Reporting.Addin.XML
+{
+	/// <summary>
+	/// Description of MycroWriter.
+	/// </summary>
+	public class MycroWriter
+	{
+		protected virtual string GetTypeName(Type t)
+		{
+			return t.Name;
+		}
+		
+		public void Save(object obj, XmlWriter writer)
+		{
+			Type t = obj.GetType();
+		
+//			writer.WriteStartElement(GetTypeName(t));
+//			System.Console.WriteLine("\tSave <{0}>",GetTypeName(t));
+			                        
+			writer.WriteStartElement(obj.GetType().Name);
+			
+			PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(obj);
+			PropertyInfo [] propertyInfos = new PropertyInfo[properties.Count];
+			
+			for (int i = 0;i < properties.Count ; i ++){
+				propertyInfos[i] = t.GetProperty(properties[i].Name);
+			}
+			
+			foreach (PropertyInfo info in propertyInfos) {
+				if (info ==  null){
+					continue;
+				}
+				if (!info.CanRead) continue;
+				
+				if (info.GetCustomAttributes(typeof(XmlIgnoreAttribute), true).Length != 0) continue;
+				object val = info.GetValue(obj, null);
+				if (val == null) continue;
+				if (val is ICollection) {
+//					PropertyInfo pinfo = t.GetProperty(info.Name);
+//					Console.WriteLine("pinfo {0}",pinfo.Name);
+					if (info.Name.StartsWith("Contr")) {
+						writer.WriteStartElement("Items");
+					} else {
+					writer.WriteStartElement(info.Name);
+					}
+					foreach (object element in (ICollection)val) {
+						Save(element, writer);
+					}
+					
+					writer.WriteEndElement();
+				} else {
+					if (!info.CanWrite) continue;
+				
+					TypeConverter c = TypeDescriptor.GetConverter(info.PropertyType);
+					if (c.CanConvertFrom(typeof(string)) && c.CanConvertTo(typeof(string))) {
+						try {
+							writer.WriteElementString(info.Name, c.ConvertToInvariantString(val));
+						} catch (Exception ex) {
+							writer.WriteComment(ex.ToString());
+						}
+					} else if (info.PropertyType == typeof(Type)) {
+						writer.WriteElementString(info.Name, ((Type)val).AssemblyQualifiedName);
+					} else {
+//						System.Diagnostics.Trace.WriteLine("Serialize Pagelayout");
+//						writer.WriteStartElement(info.Name);
+//						Save(val, writer);
+//						writer.WriteEndElement();
+					}
+				}
+			}
+			writer.WriteEndElement();
+		}
+	}
+}
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/ReportDefinitionParser.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/ReportDefinitionParser.cs
index 43e8479b78..51a88e7309 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/ReportDefinitionParser.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/ReportDefinitionParser.cs
@@ -56,9 +56,9 @@ namespace ICSharpCode.Reporting.Addin.XML
 				if (t == null) {
 					t = GetTypeByName (ns,"ErrorItem");
 				}
-				//Trace.Assert(t != null, "Type "+cname+" could not be determined.");
+				Trace.Assert(t != null, "Type "+cname+" could not be determined.");
 //				Debug.WriteLine("Looking for " + cname + " and got " + t.FullName);
-				Console.WriteLine("ReportDefinitionParser - Looking for " + cname + " and got " + t.FullName);
+//				Console.WriteLine("ReportDefinitionParser - Looking for " + cname + " and got " + t.FullName);
 				try
 				{
 					ret=Activator.CreateInstance(t);
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/ReportDesignerWriter.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/ReportDesignerWriter.cs
new file mode 100644
index 0000000000..d03d71fd80
--- /dev/null
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/ReportDesignerWriter.cs
@@ -0,0 +1,30 @@
+/*
+ * Created by SharpDevelop.
+ * User: Peter Forstmeier
+ * Date: 16.03.2014
+ * Time: 18:28
+ * 
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+using System;
+
+namespace ICSharpCode.Reporting.Addin.XML
+{
+	/// <summary>
+	/// Description of ReportDesignerWriter.
+	/// </summary>
+	public class ReportDesignerWriter:MycroWriter
+	{
+		public ReportDesignerWriter()
+		{
+		}
+		
+		protected override string GetTypeName(Type t)
+		{
+			if (t.BaseType != null && t.BaseType.Name.StartsWith("Base",StringComparison.InvariantCultureIgnoreCase)) {
+//				return t.BaseType.Name;
+			}
+			return t.Name;
+		}
+	}
+}
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/XmlHelper.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/XmlHelper.cs
new file mode 100644
index 0000000000..7a0f3b9006
--- /dev/null
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/XML/XmlHelper.cs
@@ -0,0 +1,33 @@
+/*
+ * Created by SharpDevelop.
+ * User: Peter Forstmeier
+ * Date: 16.03.2014
+ * Time: 18:25
+ * 
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+using System;
+using System.IO;
+using System.Xml;
+
+namespace ICSharpCode.Reporting.Addin.XML
+{
+	static class XmlHelper
+	{
+		public static XmlTextWriter CreatePropperWriter (StringWriter writer)
+		{
+			var xml = new XmlTextWriter(writer);
+			xml.Formatting = Formatting.Indented;
+			xml.Indentation = 4;
+			return xml;
+		}
+		
+		
+		public static void CreatePropperDocument (XmlTextWriter writer)
+		{
+			writer.WriteStartDocument();
+			writer.WriteStartElement("ReportModel");
+			writer.WriteStartElement("ReportSettings");
+		}
+	}
+}
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/ICSharpCode.Reporting.csproj b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/ICSharpCode.Reporting.csproj
index ed45bc95c7..5b538641ba 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/ICSharpCode.Reporting.csproj
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/ICSharpCode.Reporting.csproj
@@ -64,6 +64,7 @@
       <RequiredTargetFramework>3.5</RequiredTargetFramework>
     </Reference>
     <Reference Include="System.Data" />
+    <Reference Include="System.Design" />
     <Reference Include="System.Drawing" />
     <Reference Include="System.Windows.Presentation">
       <RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -124,6 +125,8 @@
     <Compile Include="Src\Expressions\TypeNormalizer.cs" />
     <Compile Include="Src\Factories\ExportColumnFactory.cs" />
     <Compile Include="Src\Factories\ReportCreatorFactory.cs" />
+    <Compile Include="Src\Factories\ReportModelFactory.cs" />
+    <Compile Include="Src\Factories\SectionFactory.cs" />
     <Compile Include="Src\Globals\CreateGraphics.cs" />
     <Compile Include="Src\Globals\MeasurementService.cs" />
     <Compile Include="Src\Globals\StandardFormatter.cs" />
@@ -223,5 +226,11 @@
   <ItemGroup>
     <Page Include="Src\Wpf\WpfReportViewer\WpfReportViewer.xaml" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
+      <Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
+      <Name>ICSharpCode.SharpDevelop</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>
\ No newline at end of file
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Factories/ReportModelFactory.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Factories/ReportModelFactory.cs
new file mode 100644
index 0000000000..67df46d54d
--- /dev/null
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Factories/ReportModelFactory.cs
@@ -0,0 +1,29 @@
+/*
+ * Created by SharpDevelop.
+ * User: Peter Forstmeier
+ * Date: 16.03.2014
+ * Time: 17:24
+ * 
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+using System;
+using ICSharpCode.Reporting.Globals;
+using ICSharpCode.Reporting.Items;
+
+namespace ICSharpCode.Reporting.Factories
+{
+	/// <summary>
+	/// Description of ReportModelFactory.
+	/// </summary>
+	public class ReportModelFactory
+	{
+		public static ReportModel Create() 
+		{
+			ReportModel m = new ReportModel();
+			foreach (GlobalEnums.ReportSection sec in Enum.GetValues(typeof(GlobalEnums.ReportSection))) {
+				m.SectionCollection.Add (SectionFactory.Create(sec.ToString()));
+			}
+			return m;
+		}
+	}
+}
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Factories/SectionFactory.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Factories/SectionFactory.cs
new file mode 100644
index 0000000000..30e297267f
--- /dev/null
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Factories/SectionFactory.cs
@@ -0,0 +1,31 @@
+/*
+ * Created by SharpDevelop.
+ * User: Peter Forstmeier
+ * Date: 16.03.2014
+ * Time: 17:06
+ * 
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+using System;
+using ICSharpCode.Reporting.Items;
+
+namespace ICSharpCode.Reporting.Factories
+{
+	/// <summary>
+	/// Description of SectionFactory.
+	/// </summary>
+	sealed class SectionFactory
+	{
+		private SectionFactory ()
+		{
+			
+		}
+		public static BaseSection Create(string name) {
+			if (name == null)
+				throw new ArgumentNullException("name");
+			
+			return new BaseSection(name);
+		}
+		
+	}
+}
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Globals/GlobalEnums.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Globals/GlobalEnums.cs
index a883afc1c3..cecd76a3ec 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Globals/GlobalEnums.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Globals/GlobalEnums.cs
@@ -27,7 +27,7 @@ namespace ICSharpCode.Reporting.Globals
 	{
 		GlobalEnums() {
 		}
-		/*
+	
 		public enum ReportSection {
 			ReportHeader,
 			ReportPageHeader,
@@ -35,7 +35,7 @@ namespace ICSharpCode.Reporting.Globals
 			ReportPageFooter,
 			ReportFooter
 		}
-		*/
+		
 		///<summary>Technics to get the data
 		/// Push : report get's a ready filld dataset or something tah implements IList
 		/// Pull : report has to fill data by themself
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/BaseSection.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/BaseSection.cs
index 55bc14706f..a57b3614cd 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/BaseSection.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/BaseSection.cs
@@ -28,12 +28,18 @@ namespace ICSharpCode.Reporting.Items
 	
 	public class BaseSection:ReportContainer,IReportContainer
 	{
+		
+
 		#region Constructors
 		
 		public BaseSection()
 		{
 		}
 		
+		public BaseSection(string name)
+		{
+			Name = name;
+		}
 		#endregion
 	}
 }
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/ReportModel.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/ReportModel.cs
index 99c4805dcb..2eae22afc0 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/ReportModel.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/ReportModel.cs
@@ -19,6 +19,8 @@
 using System;
 using System.Collections.ObjectModel;
 
+using ICSharpCode.Reporting.Factories;
+using ICSharpCode.Reporting.Globals;
 using ICSharpCode.Reporting.Interfaces;
 
 namespace ICSharpCode.Reporting.Items
@@ -33,7 +35,6 @@ namespace ICSharpCode.Reporting.Items
 			SectionCollection = new Collection<BaseSection>();
 		}
 			
-	
 		#region Sections
 		
 		public IReportContainer ReportHeader
diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/ReportSettings.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/ReportSettings.cs
index cfd5efd5a2..ff30624f6b 100644
--- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/ReportSettings.cs
+++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/ReportSettings.cs
@@ -17,17 +17,38 @@
 // DEALINGS IN THE SOFTWARE.
 
 using System;
+using System.ComponentModel;
+using System.ComponentModel.Design;
 using System.Drawing;
 using System.IO;
 
+using System.Xml.Serialization;
 using ICSharpCode.Reporting.Globals;
 
+
+
 namespace ICSharpCode.Reporting.Items
 {
 	/// <summary>
 	/// Description of ReportSettings.
 	/// </summary>
-	public class ReportSettings
+	public class ReportSettingsDesigner:ComponentDesigner
+	{
+		const string settingsName = "ReportSettings";
+		public ReportSettingsDesigner()
+		{
+		}
+		
+		public override void Initialize(IComponent component)
+		{
+			base.Initialize(component);
+			component.Site.Name = ReportSettingsDesigner.settingsName;
+		}
+	}
+	
+	
+	[Designer(typeof(ReportSettingsDesigner))]
+	public class ReportSettings:Component
 	{
 		
 		public ReportSettings()