6 changed files with 267 additions and 9 deletions
@ -0,0 +1,37 @@ |
|||||||
|
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||||
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||||
|
using System; |
||||||
|
using System.Reflection; |
||||||
|
using ICSharpCode.Reporting.Interfaces; |
||||||
|
using ICSharpCode.Reporting.PageBuilder; |
||||||
|
using ICSharpCode.Reporting.Test.DataSource; |
||||||
|
using NUnit.Framework; |
||||||
|
|
||||||
|
namespace ICSharpCode.Reporting.Test.Reportingfactory |
||||||
|
{ |
||||||
|
[TestFixture] |
||||||
|
public class GroupedPushModel |
||||||
|
{ |
||||||
|
IReportCreator reportCreator; |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void TestMethod() |
||||||
|
{ |
||||||
|
Assert.That("a",Is.EqualTo("b")); |
||||||
|
} |
||||||
|
|
||||||
|
[SetUp] |
||||||
|
public void LoadFromStream() |
||||||
|
{ |
||||||
|
var contributorList = new ContributorsList(); |
||||||
|
var list = contributorList.ContributorCollection; |
||||||
|
|
||||||
|
var asm = Assembly.GetExecutingAssembly(); |
||||||
|
var stream = asm.GetManifestResourceStream(TestHelper.GroupedList); |
||||||
|
|
||||||
|
var reportingFactory = new ReportingFactory(); |
||||||
|
var model = reportingFactory.LoadReportModel (stream); |
||||||
|
reportCreator = new DataPageBuilder(model,list); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,213 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<ReportModel> |
||||||
|
<ReportSettings> |
||||||
|
<ReportSettings> |
||||||
|
<ReportName>Report1</ReportName> |
||||||
|
<ReportType>DataReport</ReportType> |
||||||
|
<BottomMargin>50</BottomMargin> |
||||||
|
<TopMargin>50</TopMargin> |
||||||
|
<LeftMargin>50</LeftMargin> |
||||||
|
<RightMargin>50</RightMargin> |
||||||
|
<PageSize>827, 1169</PageSize> |
||||||
|
<Landscape>False</Landscape> |
||||||
|
<GraphicsUnit>Millimeter</GraphicsUnit> |
||||||
|
<Padding>5, 5, 5, 5</Padding> |
||||||
|
<AvailableFieldsCollection /> |
||||||
|
<SortColumnsCollection /> |
||||||
|
<GroupColumnsCollection /> |
||||||
|
<ParameterCollection /> |
||||||
|
<SqlParameters /> |
||||||
|
<ConnectionString /> |
||||||
|
<CommandText /> |
||||||
|
<CommandType>Text</CommandType> |
||||||
|
<DataModel>PushData</DataModel> |
||||||
|
<NoDataMessage>No Data for this Report</NoDataMessage> |
||||||
|
<DefaultFont>Microsoft Sans Serif, 10pt</DefaultFont> |
||||||
|
<UseStandardPrinter>True</UseStandardPrinter> |
||||||
|
</ReportSettings> |
||||||
|
</ReportSettings> |
||||||
|
<SectionCollection> |
||||||
|
<BaseSection> |
||||||
|
<Location>50, 50</Location> |
||||||
|
<Size>727, 60</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<SectionOffset>0</SectionOffset> |
||||||
|
<SectionMargin>0</SectionMargin> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<PageBreakAfter>False</PageBreakAfter> |
||||||
|
<Items> |
||||||
|
<BaseTextItem> |
||||||
|
<Location>313, 5</Location> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Font>Microsoft Sans Serif, 10pt</Font> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<ContentAlignment>TopLeft</ContentAlignment> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<DataType>System.String</DataType> |
||||||
|
<RTL>No</RTL> |
||||||
|
<Text>Report1</Text> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<ForeColor>Black</ForeColor> |
||||||
|
<Name>Report1</Name> |
||||||
|
</BaseTextItem> |
||||||
|
</Items> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<Name>ReportHeader</Name> |
||||||
|
</BaseSection> |
||||||
|
<BaseSection> |
||||||
|
<Location>50, 125</Location> |
||||||
|
<Size>727, 60</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<SectionOffset>0</SectionOffset> |
||||||
|
<SectionMargin>0</SectionMargin> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<PageBreakAfter>False</PageBreakAfter> |
||||||
|
<Items /> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<Name>ReportPageHeader</Name> |
||||||
|
</BaseSection> |
||||||
|
<BaseSection> |
||||||
|
<Location>50, 200</Location> |
||||||
|
<Size>727, 100</Size> |
||||||
|
<BackColor>LightGray</BackColor> |
||||||
|
<SectionOffset>0</SectionOffset> |
||||||
|
<SectionMargin>0</SectionMargin> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<PageBreakAfter>False</PageBreakAfter> |
||||||
|
<Items> |
||||||
|
<GroupHeader> |
||||||
|
<Location>38, 20</Location> |
||||||
|
<Size>473, 30</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<ForeColor>ControlText</ForeColor> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<Items> |
||||||
|
<BaseDataItem> |
||||||
|
<Location>21, 4</Location> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Font>Segoe UI, 9pt</Font> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<ContentAlignment>TopLeft</ContentAlignment> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<RTL>No</RTL> |
||||||
|
<Text>BaseDataItem3</Text> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<ForeColor>ControlText</ForeColor> |
||||||
|
<ColumnName>GoupItem</ColumnName> |
||||||
|
<Name>BaseDataItem3</Name> |
||||||
|
</BaseDataItem> |
||||||
|
</Items> |
||||||
|
<AlternateBackColor /> |
||||||
|
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow> |
||||||
|
<PageBreakOnGroupChange>False</PageBreakOnGroupChange> |
||||||
|
<Name>GroupHeader1</Name> |
||||||
|
</GroupHeader> |
||||||
|
<BaseDataItem> |
||||||
|
<Location>289, 56</Location> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Font>Segoe UI, 9pt</Font> |
||||||
|
<FormatString>#,##0.00</FormatString> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<ContentAlignment>MiddleRight</ContentAlignment> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<DataType>System.Decimal</DataType> |
||||||
|
<RTL>No</RTL> |
||||||
|
<Text>BaseDataItem2</Text> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<ForeColor>ControlText</ForeColor> |
||||||
|
<ColumnName>RandomInt</ColumnName> |
||||||
|
<Name>BaseDataItem2</Name> |
||||||
|
</BaseDataItem> |
||||||
|
<BaseDataItem> |
||||||
|
<Location>75, 56</Location> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Font>Microsoft Sans Serif, 10pt</Font> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<ContentAlignment>TopLeft</ContentAlignment> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<DataType>System.String</DataType> |
||||||
|
<RTL>No</RTL> |
||||||
|
<Text>BaseDataItem1</Text> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<ForeColor>Black</ForeColor> |
||||||
|
<ColumnName>Firstname</ColumnName> |
||||||
|
<Name>BaseDataItem1</Name> |
||||||
|
</BaseDataItem> |
||||||
|
</Items> |
||||||
|
<FrameColor>LightGray</FrameColor> |
||||||
|
<Name>ReportDetail</Name> |
||||||
|
</BaseSection> |
||||||
|
<BaseSection> |
||||||
|
<Location>50, 315</Location> |
||||||
|
<Size>727, 60</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<SectionOffset>0</SectionOffset> |
||||||
|
<SectionMargin>0</SectionMargin> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<PageBreakAfter>False</PageBreakAfter> |
||||||
|
<Items> |
||||||
|
<BaseTextItem> |
||||||
|
<Location>622, 5</Location> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Font>Microsoft Sans Serif, 10pt</Font> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<ContentAlignment>TopLeft</ContentAlignment> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<DataType>System.String</DataType> |
||||||
|
<RTL>No</RTL> |
||||||
|
<Text>=Globals!PageNumber</Text> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<ForeColor>Black</ForeColor> |
||||||
|
<Name>PageNumber1</Name> |
||||||
|
</BaseTextItem> |
||||||
|
</Items> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<Name>ReportPageFooter</Name> |
||||||
|
</BaseSection> |
||||||
|
<BaseSection> |
||||||
|
<Location>50, 390</Location> |
||||||
|
<Size>727, 60</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<SectionOffset>0</SectionOffset> |
||||||
|
<SectionMargin>0</SectionMargin> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<PageBreakAfter>False</PageBreakAfter> |
||||||
|
<Items> |
||||||
|
<BaseTextItem> |
||||||
|
<Location>298, 4</Location> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Font>Segoe UI, 9pt</Font> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<ContentAlignment>TopLeft</ContentAlignment> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<RTL>No</RTL> |
||||||
|
<Text>= sum('RandomInt')</Text> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<ForeColor>ControlText</ForeColor> |
||||||
|
<Name>BaseTextItem2147483646</Name> |
||||||
|
</BaseTextItem> |
||||||
|
</Items> |
||||||
|
<FrameColor>Black</FrameColor> |
||||||
|
<Name>ReportFooter</Name> |
||||||
|
</BaseSection> |
||||||
|
</SectionCollection> |
||||||
|
</ReportModel> |
||||||
Loading…
Reference in new issue