Browse Source

CodeQuality/CodeQuality.csproj can run one easy report with ICSharpcode.Reporting

reports
Peter Forstmeier 12 years ago
parent
commit
5360a89332
  1. 16
      SharpDevelop.Tests.sln
  2. 8
      src/AddIns/Analysis/CodeQuality/CodeQuality.csproj
  3. 9
      src/AddIns/Analysis/CodeQuality/Gui/MainView.xaml
  4. 9
      src/AddIns/Analysis/CodeQuality/Gui/MainView.xaml.cs
  5. 4
      src/AddIns/Analysis/CodeQuality/Reporting/BaseReport.cs
  6. 20
      src/AddIns/Analysis/CodeQuality/Reporting/DependencyReport.cs
  7. 92
      src/AddIns/Analysis/CodeQuality/Reporting/DependencyReport.srd
  8. 8
      src/AddIns/Analysis/CodeQuality/Reporting/OverviewReport.cs
  9. 29
      src/AddIns/Analysis/CodeQuality/Reporting/Overviewreport.srd
  10. 12
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/DataManager/Listhandling/CollectionDataSource.cs

16
SharpDevelop.Tests.sln

@ -497,6 +497,14 @@ Global @@ -497,6 +497,14 @@ Global
{D81F5C91-D7DB-46E5-BC99-49488FB6814C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D81F5C91-D7DB-46E5-BC99-49488FB6814C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D81F5C91-D7DB-46E5-BC99-49488FB6814C}.Release|Any CPU.Build.0 = Release|Any CPU
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Release|Any CPU.Build.0 = Release|Any CPU
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Release|Any CPU.Build.0 = Release|Any CPU
{0162E499-42D0-409B-AA25-EED21F75336B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0162E499-42D0-409B-AA25-EED21F75336B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0162E499-42D0-409B-AA25-EED21F75336B}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -649,14 +657,6 @@ Global @@ -649,14 +657,6 @@ Global
{3DF4060F-5EE0-41CF-8096-F27355FD5511}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DF4060F-5EE0-41CF-8096-F27355FD5511}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DF4060F-5EE0-41CF-8096-F27355FD5511}.Release|Any CPU.Build.0 = Release|Any CPU
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Release|Any CPU.Build.0 = Release|Any CPU
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

8
src/AddIns/Analysis/CodeQuality/CodeQuality.csproj

@ -111,6 +111,7 @@ @@ -111,6 +111,7 @@
<EmbeddedResource Include="Reporting\Overviewreport.srd">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Reporting\DependencyReport - Kopie.srd" />
</ItemGroup>
<ItemGroup>
<Folder Include="Engine\Dom" />
@ -172,10 +173,9 @@ @@ -172,10 +173,9 @@
<Name>ICSharpCode.SharpDevelop.Widgets</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\Misc\Reports\ICSharpCode.Reports.Core\ICSharpCode.Reports.Core.csproj">
<Project>{7C3579BC-2A64-4108-82B5-3D07ADA079E7}</Project>
<Name>ICSharpCode.Reports.Core</Name>
<Private>False</Private>
<ProjectReference Include="..\..\Misc\Reporting\ICSharpCode.Reporting\ICSharpCode.Reporting.csproj">
<Project>{40CA84D4-ACFC-4646-9CDD-B87262D34093}</Project>
<Name>ICSharpCode.Reporting</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />

9
src/AddIns/Analysis/CodeQuality/Gui/MainView.xaml

@ -4,15 +4,15 @@ @@ -4,15 +4,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:gui="clr-namespace:ICSharpCode.CodeQuality.Gui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:rep="clr-namespace:ICSharpCode.Reports.Core.WpfReportViewer;assembly=ICSharpCode.Reports.Core">
xmlns:reporting="clr-namespace:ICSharpCode.Reporting.WpfReportViewer;assembly=ICSharpCode.Reporting">
<DockPanel>
<ToolBar DockPanel.Dock="Top">
<Button Click="AddAssemblyClick">Add Assembly</Button>
<Menu Background="White" x:Name="printMenu" Visibility="Hidden">
<MenuItem Header="Reports">
<MenuItem Header="Overview" Click="OverviewReport_Click"></MenuItem>
<!--<MenuItem Header="Overview" Click="OverviewReport_Click"></MenuItem>-->
<MenuItem Header="Dependecies" Click=" DependecyReport_Click"></MenuItem>
</MenuItem>
@ -39,8 +39,7 @@ @@ -39,8 +39,7 @@
x:Name="reportTab"
Visibility="Hidden">
<Grid>
<rep:WpfReportViewer
x:Name="viewer" />
<reporting:WpfReportViewer x:Name="viewer" />
</Grid>
</TabItem>
</TabControl>

9
src/AddIns/Analysis/CodeQuality/Gui/MainView.xaml.cs

@ -19,18 +19,13 @@ @@ -19,18 +19,13 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using ICSharpCode.Reporting.WpfReportViewer;
using ICSharpCode.CodeQuality.Engine;
using ICSharpCode.CodeQuality.Engine.Dom;
using ICSharpCode.CodeQuality.Reporting;
using ICSharpCode.Reports.Core.WpfReportViewer;
using ICSharpCode.SharpDevelop.Gui;
using Microsoft.Win32;
@ -102,11 +97,13 @@ namespace ICSharpCode.CodeQuality.Gui @@ -102,11 +97,13 @@ namespace ICSharpCode.CodeQuality.Gui
void DependecyReport_Click(object sender, RoutedEventArgs e)
{
var dependencyReport = new DependencyReport(fileNames);
var reportCreator = dependencyReport.Run(list);
var previewViewModel = new PreviewViewModel(dependencyReport.ReportSettings,reportCreator.Pages);
viewer.SetBinding(previewViewModel);
ActivateReportTab();
}
void ActivateReportTab()

4
src/AddIns/Analysis/CodeQuality/Reporting/BaseReport.cs

@ -18,10 +18,8 @@ @@ -18,10 +18,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using ICSharpCode.Reporting.Items;
using ICSharpCode.Reports.Core;
namespace ICSharpCode.CodeQuality.Reporting
{

20
src/AddIns/Analysis/CodeQuality/Reporting/DependencyReport.cs

@ -21,8 +21,9 @@ using System.Collections.Generic; @@ -21,8 +21,9 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
using ICSharpCode.Reporting;
using ICSharpCode.Reporting.Interfaces;
using ICSharpCode.CodeQuality.Engine.Dom;
using ICSharpCode.Reports.Core;
namespace ICSharpCode.CodeQuality.Reporting
{
@ -38,16 +39,17 @@ namespace ICSharpCode.CodeQuality.Reporting @@ -38,16 +39,17 @@ namespace ICSharpCode.CodeQuality.Reporting
}
public IReportCreator Run(ReadOnlyCollection<AssemblyNode> list)
{
System.Reflection.Assembly asm = Assembly.GetExecutingAssembly();
System.IO.Stream stream = asm.GetManifestResourceStream("ICSharpCode.CodeQuality.Reporting.DependencyReport.srd");
var model = ReportEngine.LoadReportModel(stream);
ReportSettings = model.ReportSettings;
{
var newList = MakeList (list);
IReportCreator creator = ReportEngine.CreatePageBuilder(model,newList,null);
creator.BuildExportList();
return creator;
Assembly asm = Assembly.GetExecutingAssembly();
System.IO.Stream stream = asm.GetManifestResourceStream("ICSharpCode.CodeQuality.Reporting.DependencyReport.srd");
var rf = new ReportingFactory();
var reportCreator = rf.ReportCreator (stream,newList);
ReportSettings = rf.ReportModel.ReportSettings;
reportCreator.BuildExportList();
return reportCreator;
}

92
src/AddIns/Analysis/CodeQuality/Reporting/DependencyReport.srd

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
<GroupColumnsCollection>
<GroupColumn>
<SortDirection>Ascending</SortDirection>
<CaseSensitive>False</CaseSensitive>
<ColumnName>Name</ColumnName>
<DataTypeName>System.String</DataTypeName>
</GroupColumn>
@ -37,7 +38,6 @@ @@ -37,7 +38,6 @@
<Location>50, 50</Location>
<Size>727, 60</Size>
<BackColor>White</BackColor>
<VisibleInReport>False</VisibleInReport>
<SectionOffset>0</SectionOffset>
<SectionMargin>0</SectionMargin>
<DrawBorder>False</DrawBorder>
@ -47,7 +47,6 @@ @@ -47,7 +47,6 @@
<Location>157, 3</Location>
<Size>414, 40</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 18pt, style=Bold</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -68,7 +67,6 @@ @@ -68,7 +67,6 @@
<Location>50, 125</Location>
<Size>727, 69</Size>
<BackColor>White</BackColor>
<VisibleInReport>False</VisibleInReport>
<SectionOffset>0</SectionOffset>
<SectionMargin>0</SectionMargin>
<DrawBorder>False</DrawBorder>
@ -78,7 +76,6 @@ @@ -78,7 +76,6 @@
<Location>22, 47</Location>
<Size>660, 10</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<ForeColor>Black</ForeColor>
<FromPoint>10, 5</FromPoint>
<ToPoint>647, 5</ToPoint>
@ -93,7 +90,6 @@ @@ -93,7 +90,6 @@
<Location>222, 3</Location>
<Size>257, 26</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Microsoft Sans Serif, 15.75pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -111,7 +107,6 @@ @@ -111,7 +107,6 @@
<Location>563, 3</Location>
<Size>100, 26</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 15.75pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -132,67 +127,49 @@ @@ -132,67 +127,49 @@
<Location>50, 209</Location>
<Size>727, 115</Size>
<BackColor>White</BackColor>
<VisibleInReport>False</VisibleInReport>
<SectionOffset>0</SectionOffset>
<SectionMargin>0</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items>
<BaseRowItem>
<Location>31, 72</Location>
<Size>641, 30</Size>
<BaseDataItem>
<Location>445, 72</Location>
<Size>71, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<RTL>No</RTL>
<Text>BaseDataItem2147483646</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>Black</FrameColor>
<ForeColor>Black</ForeColor>
<ColumnName>ReferenceCount</ColumnName>
<Name>BaseDataItem2147483646</Name>
</BaseDataItem>
<BaseDataItem>
<Location>256, 72</Location>
<Size>156, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 10pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<RTL>No</RTL>
<Text>References</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>Black</FrameColor>
<Items>
<BaseDataItem>
<Location>443, 4</Location>
<Size>71, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<RTL>No</RTL>
<Text>BaseDataItem2147483646</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>Black</FrameColor>
<ForeColor>Black</ForeColor>
<ColumnName>ReferenceCount</ColumnName>
<Name>BaseDataItem2147483646</Name>
</BaseDataItem>
<BaseDataItem>
<Location>254, 4</Location>
<Size>156, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Microsoft Sans Serif, 10pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<RTL>No</RTL>
<Text>References</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>Black</FrameColor>
<ForeColor>Black</ForeColor>
<ColumnName>References</ColumnName>
<Name>BaseDataItem2</Name>
</BaseDataItem>
</Items>
<AlternateBackColor />
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow>
<Name>BaseRowItem1</Name>
</BaseRowItem>
<ForeColor>Black</ForeColor>
<ColumnName>References</ColumnName>
<Name>BaseDataItem2</Name>
</BaseDataItem>
<GroupHeader>
<Location>31, 22</Location>
<Size>641, 30</Size>
<BackColor>LightGray</BackColor>
<VisibleInReport>True</VisibleInReport>
<DrawBorder>False</DrawBorder>
<ForeColor>Black</ForeColor>
<FrameColor>Black</FrameColor>
@ -201,7 +178,6 @@ @@ -201,7 +178,6 @@
<Location>414, 7</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9.75pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
@ -218,7 +194,6 @@ @@ -218,7 +194,6 @@
<Location>254, 2</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Microsoft Sans Serif, 10pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -235,7 +210,6 @@ @@ -235,7 +210,6 @@
<Location>12, 3</Location>
<Size>211, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Microsoft Sans Serif, 10pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -263,7 +237,6 @@ @@ -263,7 +237,6 @@
<Location>50, 339</Location>
<Size>727, 36</Size>
<BackColor>White</BackColor>
<VisibleInReport>False</VisibleInReport>
<SectionOffset>0</SectionOffset>
<SectionMargin>0</SectionMargin>
<DrawBorder>False</DrawBorder>
@ -273,7 +246,6 @@ @@ -273,7 +246,6 @@
<Location>31, 5</Location>
<Size>555, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9.75pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -290,7 +262,6 @@ @@ -290,7 +262,6 @@
<Location>624, 5</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Microsoft Sans Serif, 10pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -312,7 +283,6 @@ @@ -312,7 +283,6 @@
<Location>50, 390</Location>
<Size>727, 60</Size>
<BackColor>White</BackColor>
<VisibleInReport>False</VisibleInReport>
<SectionOffset>0</SectionOffset>
<SectionMargin>0</SectionMargin>
<DrawBorder>False</DrawBorder>

8
src/AddIns/Analysis/CodeQuality/Reporting/OverviewReport.cs

@ -19,13 +19,12 @@ @@ -19,13 +19,12 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Reflection;
using ICSharpCode.CodeQuality.Engine.Dom;
using ICSharpCode.NRefactory.Utils;
using ICSharpCode.Reports.Core;
using ICSharpCode.Reporting.Interfaces;
using ICSharpCode.CodeQuality.Engine.Dom;
namespace ICSharpCode.CodeQuality.Reporting
{
@ -42,6 +41,7 @@ namespace ICSharpCode.CodeQuality.Reporting @@ -42,6 +41,7 @@ namespace ICSharpCode.CodeQuality.Reporting
public IReportCreator Run(ReadOnlyCollection<AssemblyNode> list)
{
/*
System.Reflection.Assembly asm = Assembly.GetExecutingAssembly();
System.IO.Stream stream = asm.GetManifestResourceStream("ICSharpCode.CodeQuality.Reporting.Overviewreport.srd");
var model = ReportEngine.LoadReportModel(stream);
@ -57,6 +57,8 @@ namespace ICSharpCode.CodeQuality.Reporting @@ -57,6 +57,8 @@ namespace ICSharpCode.CodeQuality.Reporting
IReportCreator creator = ReportEngine.CreatePageBuilder(model,r.ToList(),p);
creator.BuildExportList();
return creator;
*/
return null;
}
}

29
src/AddIns/Analysis/CodeQuality/Reporting/Overviewreport.srd

@ -39,7 +39,6 @@ @@ -39,7 +39,6 @@
<Location>50, 50</Location>
<Size>727, 168</Size>
<BackColor>White</BackColor>
<VisibleInReport>False</VisibleInReport>
<SectionOffset>0</SectionOffset>
<SectionMargin>0</SectionMargin>
<DrawBorder>False</DrawBorder>
@ -49,7 +48,6 @@ @@ -49,7 +48,6 @@
<Location>122, 13</Location>
<Size>414, 40</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 18pt, style=Bold</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -66,7 +64,6 @@ @@ -66,7 +64,6 @@
<Location>601, 59</Location>
<Size>100, 26</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 15.75pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -83,7 +80,6 @@ @@ -83,7 +80,6 @@
<Location>12, 145</Location>
<Size>680, 10</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<ForeColor>ControlText</ForeColor>
<FromPoint>10, 5</FromPoint>
<ToPoint>669, 6</ToPoint>
@ -98,7 +94,6 @@ @@ -98,7 +94,6 @@
<Location>139, 118</Location>
<Size>108, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -115,7 +110,6 @@ @@ -115,7 +110,6 @@
<Location>27, 118</Location>
<Size>106, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -132,7 +126,6 @@ @@ -132,7 +126,6 @@
<Location>139, 91</Location>
<Size>438, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -149,7 +142,6 @@ @@ -149,7 +142,6 @@
<Location>27, 91</Location>
<Size>106, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -166,7 +158,6 @@ @@ -166,7 +158,6 @@
<Location>195, 59</Location>
<Size>257, 26</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Microsoft Sans Serif, 15.75pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -188,7 +179,6 @@ @@ -188,7 +179,6 @@
<Location>50, 233</Location>
<Size>727, 60</Size>
<BackColor>White</BackColor>
<VisibleInReport>False</VisibleInReport>
<SectionOffset>0</SectionOffset>
<SectionMargin>0</SectionMargin>
<DrawBorder>False</DrawBorder>
@ -198,7 +188,6 @@ @@ -198,7 +188,6 @@
<Location>14, 16</Location>
<Size>658, 30</Size>
<BackColor>LightGray</BackColor>
<VisibleInReport>True</VisibleInReport>
<DrawBorder>False</DrawBorder>
<ForeColor>ControlText</ForeColor>
<FrameColor>Black</FrameColor>
@ -207,7 +196,6 @@ @@ -207,7 +196,6 @@
<Location>571, 7</Location>
<Size>41, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
@ -224,7 +212,6 @@ @@ -224,7 +212,6 @@
<Location>501, 7</Location>
<Size>53, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
@ -241,7 +228,6 @@ @@ -241,7 +228,6 @@
<Location>425, 7</Location>
<Size>55, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
@ -258,7 +244,6 @@ @@ -258,7 +244,6 @@
<Location>347, 7</Location>
<Size>52, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
@ -275,7 +260,6 @@ @@ -275,7 +260,6 @@
<Location>267, 7</Location>
<Size>55, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
@ -292,7 +276,6 @@ @@ -292,7 +276,6 @@
<Location>4, 7</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -318,7 +301,6 @@ @@ -318,7 +301,6 @@
<Location>50, 308</Location>
<Size>727, 60</Size>
<BackColor>White</BackColor>
<VisibleInReport>False</VisibleInReport>
<SectionOffset>0</SectionOffset>
<SectionMargin>0</SectionMargin>
<DrawBorder>False</DrawBorder>
@ -328,7 +310,6 @@ @@ -328,7 +310,6 @@
<Location>14, 14</Location>
<Size>658, 30</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<DrawBorder>False</DrawBorder>
<ForeColor>Black</ForeColor>
<FrameColor>Black</FrameColor>
@ -337,7 +318,6 @@ @@ -337,7 +318,6 @@
<Location>571, 3</Location>
<Size>41, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
@ -355,7 +335,6 @@ @@ -355,7 +335,6 @@
<Location>501, 3</Location>
<Size>53, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
@ -373,7 +352,6 @@ @@ -373,7 +352,6 @@
<Location>425, 3</Location>
<Size>55, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
@ -391,7 +369,6 @@ @@ -391,7 +369,6 @@
<Location>347, 3</Location>
<Size>52, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>MiddleRight</ContentAlignment>
@ -409,7 +386,6 @@ @@ -409,7 +386,6 @@
<Location>268, 3</Location>
<Size>54, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9pt</Font>
<FormatString>0</FormatString>
<StringTrimming>None</StringTrimming>
@ -429,7 +405,6 @@ @@ -429,7 +405,6 @@
<Location>4, 3</Location>
<Size>258, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Microsoft Sans Serif, 10pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -456,7 +431,6 @@ @@ -456,7 +431,6 @@
<Location>50, 383</Location>
<Size>727, 37</Size>
<BackColor>White</BackColor>
<VisibleInReport>False</VisibleInReport>
<SectionOffset>0</SectionOffset>
<SectionMargin>0</SectionMargin>
<DrawBorder>False</DrawBorder>
@ -466,7 +440,6 @@ @@ -466,7 +440,6 @@
<Location>14, 3</Location>
<Size>573, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Segoe UI, 9.75pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -483,7 +456,6 @@ @@ -483,7 +456,6 @@
<Location>614, 3</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<VisibleInReport>True</VisibleInReport>
<Font>Microsoft Sans Serif, 10pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
@ -505,7 +477,6 @@ @@ -505,7 +477,6 @@
<Location>50, 435</Location>
<Size>727, 60</Size>
<BackColor>White</BackColor>
<VisibleInReport>False</VisibleInReport>
<SectionOffset>0</SectionOffset>
<SectionMargin>0</SectionMargin>
<DrawBorder>False</DrawBorder>

12
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/DataManager/Listhandling/CollectionDataSource.cs

@ -148,11 +148,15 @@ namespace ICSharpCode.Reporting.DataManager.Listhandling @@ -148,11 +148,15 @@ namespace ICSharpCode.Reporting.DataManager.Listhandling
IEnumerable<IGrouping<object, object>> GroupInternal () {
var property = listProperties.Find(reportSettings.GroupColumnsCollection[0].ColumnName,true);
var groupProperty = listProperties.Find(reportSettings.GroupColumnsCollection[0].ColumnName,true);
var sortProperty = listProperties.Find("Randomint",true);
var groupedList = baseList.OrderBy(o => o.GetType().GetProperty(sortProperty.Name).GetValue(o, null) )
.GroupBy(a => a.GetType().GetProperty(property.Name).GetValue(a, null)).OrderBy(c => c.Key);
IEnumerable<IGrouping<object, object>> groupedList;
if (sortProperty == null) {
groupedList = baseList.GroupBy(a => a.GetType().GetProperty(groupProperty.Name).GetValue(a, null)).OrderBy(c => c.Key);
} else {
groupedList = baseList.OrderBy(o => o.GetType().GetProperty(sortProperty.Name).GetValue(o, null) )
.GroupBy(a => a.GetType().GetProperty(groupProperty.Name).GetValue(a, null)).OrderBy(c => c.Key);
}
return groupedList;
}

Loading…
Cancel
Save