Skip to content

Commit

Permalink
Merge pull request #127 from FastReports/sync_branch_637037067384037983
Browse files Browse the repository at this point in the history
* sync 9/10/2019
  • Loading branch information
Detrav authored Sep 10, 2019
2 parents 997344d + 0070234 commit 69a0009
Show file tree
Hide file tree
Showing 69 changed files with 4,474 additions and 544 deletions.
29 changes: 16 additions & 13 deletions Demos/Reports/Polygon.frx
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" SmoothGraphics="true" ReportInfo.Description="This report demonstrates the PolyLineObject and PolygonObject features." ReportInfo.Created="06/02/2009 00:44:01" ReportInfo.Modified="03/12/2018 08:49:57" ReportInfo.CreatorVersion="1.0.0.0">
<Report ScriptLanguage="CSharp" SmoothGraphics="true" ReportInfo.Description="This report demonstrates the PolyLineObject and PolygonObject features." ReportInfo.Created="06/02/2009 00:44:01" ReportInfo.Modified="09/10/2019 10:08:45" ReportInfo.CreatorVersion="2019.3.24.0">
<Dictionary/>
<ReportPage Name="Page1">
<ReportPage Name="Page1" Watermark.Font="Arial, 60pt">
<ReportTitleBand Name="ReportTitle1" Width="718.2" Height="94.5" CanGrow="true">
<TextObject Name="Text29" Top="-1" Width="718.2" Height="28.35" Anchor="Top, Left, Right" Fill.Color="WhiteSmoke" CanGrow="true" Text="[Report.ReportInfo.Description]" Padding="4, 4, 4, 4" VertAlign="Center" Font="Tahoma, 8pt"/>
<TextObject Name="Text30" Top="46.25" Width="718.2" Height="28.35" Text="PolyLineObject and PolygonObject" HorzAlign="Center" VertAlign="Center" Font="Tahoma, 14pt, style=Bold"/>
</ReportTitleBand>
<DataBand Name="Data1" Top="99.83" Width="718.2" Height="557.55">
<DataBand Name="Data1" Top="97.7" Width="718.2" Height="907.22">
<TextObject Name="Text12" Left="9.45" Width="652.05" Height="37.8" Fill.Color="Orange" Text="PENTAGON, HEXAGON, HEPTAGON, OCTAGON" VertAlign="Center" Font="Tahoma, 16pt"/>
<TextObject Name="Text20" Left="9.45" Top="378" Width="652.05" Height="37.8" Fill.Color="Orange" Text="PolyLine" VertAlign="Center" Font="Tahoma, 16pt"/>
<TextObject Name="Text21" Left="9.45" Top="189" Width="652.05" Height="37.8" Fill.Color="Orange" Text="ANY NUMBER OF POINTS AND FILL&#13;&#10;" VertAlign="Center" Font="Tahoma, 16pt"/>
<PolyLineObject Name="PolyLine1" Left="47.25" Top="444.15" Width="591.21" Height="86.62" PolyPoints="0\0\0|67.03571\73.43353\1|163.739\3.103821\1|232.9698\81.12579\1|302.2005\6.400574\1|352.75\78.92804\1|421.9807\10.79614\1|490.1126\86.6203\1|551.6511\5.301636\1|591.2115\80.02692\1" CenterX="0" CenterY="0"/>
<PolygonObject Name="Polygon11" Left="47.25" Top="255.15" Width="100" Height="100" Fill="PathGradient" Fill.CenterColor="Black" Fill.EdgeColor="White" Fill.Style="Elliptic" PolyPoints="0\-50\0|-9.184548E-15\-50\1|17.63356\-24.27051\1|47.55283\-15.45085\1|28.5317\9.27051\1|29.38926\40.45085\1|9.184548E-15\30\1|-29.38926\40.45085\1|-28.5317\9.27051\1|-47.55283\-15.45085\1|-17.63356\-24.27051\1" CenterX="50" CenterY="50"/>
<PolygonObject Name="Polygon5" Left="198.45" Top="255.15" Width="100" Height="100" Fill="LinearGradient" Fill.StartColor="Brown" Fill.EndColor="White" Fill.Angle="0" Fill.Focus="0.49" Fill.Contrast="1" PolyPoints="0\-50\0|-9.184548E-15\-50\1|15\-25.98076\1|43.30127\-25\1|30\1.929771E-14\1|43.30127\25\1|15\25.98076\1|-7.351026E-14\50\1|-15\25.98076\1|-43.30127\25\1|-30\1.102146E-14\1|-43.30127\-25\1|-15\-25.98076\1" CenterX="50" CenterY="50"/>
<PolygonObject Name="Polygon6" Left="368.55" Top="255.15" Width="100" Height="100" Fill="Hatch" Fill.ForeColor="Black" Fill.BackColor="White" Fill.Style="BackwardDiagonal" PolyPoints="0\-50\0|-9.184548E-15\-50\1|13.01651\-27.02907\1|39.09158\-31.17449\1|29.24784\-6.675628\1|48.7464\11.12605\1|23.45494\18.70469\1|21.69419\45.04844\1|9.184548E-15\30\1|-21.69419\45.04844\1|-23.45494\18.70469\1|-48.7464\11.12605\1|-29.24784\-6.675628\1|-39.09158\-31.17449\1|-13.01651\-27.02907\1" CenterX="50" CenterY="50"/>
<PolygonObject Name="Polygon7" Left="519.75" Top="255.15" Width="100" Height="100" Fill.Color="Highlight" PolyPoints="0\-50\0|-9.184548E-15\-50\1|11.4805\-27.71638\1|35.35534\-35.35534\1|27.71638\-11.4805\1|50\7.657178E-14\1|27.71638\11.4805\1|35.35534\35.35534\1|11.4805\27.71638\1|-1.623281E-13\50\1|-11.4805\27.71638\1|-35.35534\35.35534\1|-27.71638\11.4805\1|-50\-2.480844E-13\1|-27.71638\-11.4805\1|-35.35534\-35.35534\1|-11.4805\-27.71638\1" CenterX="50" CenterY="50"/>
<PolygonObject Name="Polygon1" Left="47.25" Top="66.15" Width="100" Height="100" PolyPoints="100\50\0|65.45085\97.55283\1|9.549149\79.38927\1|9.549149\20.61074\1|65.45085\2.447174\1" CenterX="0" CenterY="0"/>
<PolygonObject Name="Polygon2" Left="198.45" Top="66.15" Width="100" Height="100" PolyPoints="100\50\0|75\93.30127\1|25\93.30127\1|0\50\1|25\6.69873\1|75\6.69873\1" CenterX="0" CenterY="0"/>
<PolygonObject Name="Polygon3" Left="368.55" Top="66.15" Width="100" Height="100" PolyPoints="100\50\0|81.17449\89.09158\1|38.87395\98.7464\1|4.951557\71.69418\1|4.951557\28.30581\1|38.87395\1.253605\1|81.17449\10.90842\1" CenterX="0" CenterY="0"/>
<PolygonObject Name="Polygon4" Left="519.75" Top="66.15" Width="100" Height="100" PolyPoints="100\50\0|85.35534\85.35534\1|50\100\1|14.64466\85.35534\1|0\50\1|14.64466\14.64466\1|50\0\1|85.35534\14.64466\1" CenterX="0" CenterY="0"/>
<PolyLineObject Name="PolyLine1" Left="47.25" Top="444.15" Width="591.21" Height="86.62" PolyPoints_v2="0/0|67.0357/73.4335|163.739/3.1038|232.9698/81.1258|302.2005/6.4006|352.75/78.928|421.9807/10.7961|490.1126/86.6203|551.6511/5.3016|591.2115/80.0269" CenterX="0" CenterY="0"/>
<PolygonObject Name="Polygon11" Left="47.25" Top="255.15" Width="100" Height="100" Fill="PathGradient" Fill.CenterColor="Black" Fill.EdgeColor="White" Fill.Style="Elliptic" PolyPoints_v2="0/-50|0/-50|17.6336/-24.2705|47.5528/-15.4508|28.5317/9.2705|29.3893/40.4509|0/30|-29.3893/40.4509|-28.5317/9.2705|-47.5528/-15.4508|-17.6336/-24.2705" CenterX="50" CenterY="50"/>
<PolygonObject Name="Polygon5" Left="198.45" Top="255.15" Width="100" Height="100" Fill="LinearGradient" Fill.StartColor="Brown" Fill.EndColor="White" Fill.Angle="0" Fill.Focus="0.49" Fill.Contrast="1" PolyPoints_v2="0/-50|0/-50|15/-25.9808|43.3013/-25|30/0|43.3013/25|15/25.9808|0/50|-15/25.9808|-43.3013/25|-30/0|-43.3013/-25|-15/-25.9808" CenterX="50" CenterY="50"/>
<PolygonObject Name="Polygon6" Left="368.55" Top="255.15" Width="100" Height="100" Fill="Hatch" Fill.ForeColor="Black" Fill.BackColor="White" Fill.Style="BackwardDiagonal" PolyPoints_v2="0/-50|0/-50|13.0165/-27.0291|39.0916/-31.1745|29.2478/-6.6756|48.7464/11.126|23.4549/18.7047|21.6942/45.0484|0/30|-21.6942/45.0484|-23.4549/18.7047|-48.7464/11.126|-29.2478/-6.6756|-39.0916/-31.1745|-13.0165/-27.0291" CenterX="50" CenterY="50"/>
<PolygonObject Name="Polygon7" Left="519.75" Top="255.15" Width="100" Height="100" Fill.Color="Highlight" PolyPoints_v2="0/-50|0/-50|11.4805/-27.7164|35.3553/-35.3553|27.7164/-11.4805|50/0|27.7164/11.4805|35.3553/35.3553|11.4805/27.7164|0/50|-11.4805/27.7164|-35.3553/35.3553|-27.7164/11.4805|-50/0|-27.7164/-11.4805|-35.3553/-35.3553|-11.4805/-27.7164" CenterX="50" CenterY="50"/>
<PolygonObject Name="Polygon1" Left="47.25" Top="66.15" Width="100" Height="100" PolyPoints_v2="100/50|65.4509/97.5528|9.5491/79.3893|9.5491/20.6107|65.4509/2.4472" CenterX="0" CenterY="0"/>
<PolygonObject Name="Polygon2" Left="198.45" Top="66.15" Width="100" Height="100" PolyPoints_v2="100/50|75/93.3013|25/93.3013|0/50|25/6.6987|75/6.6987" CenterX="0" CenterY="0"/>
<PolygonObject Name="Polygon3" Left="368.55" Top="66.15" Width="100" Height="100" PolyPoints_v2="100/50|81.1745/89.0916|38.874/98.7464|4.9516/71.6942|4.9516/28.3058|38.874/1.2536|81.1745/10.9084" CenterX="0" CenterY="0"/>
<PolygonObject Name="Polygon4" Left="519.75" Top="66.15" Width="100" Height="100" PolyPoints_v2="100/50|85.3553/85.3553|50/100|14.6447/85.3553|0/50|14.6447/14.6447|50/0|85.3553/14.6447" CenterX="0" CenterY="0"/>
<TextObject Name="Text32" Left="9.45" Top="548.1" Width="652.05" Height="37.8" Fill.Color="Orange" Text="Bézier Curves" VertAlign="Center" Font="Tahoma, 16pt"/>
<PolygonObject Name="Polygon8" Left="47.17" Top="603.09" Width="255.2" Height="294.68" Border.Width="2" Fill="PathGradient" Fill.CenterColor="SkyBlue" Fill.EdgeColor="White" Fill.Style="Elliptic" PolyPoints_v2="39.8684/16.2883/L/-20.7991/-24.0734|71.7631/-24.4324/R/-48.1515/-50.4879|-55.8158/-73.2973/L/30.5166/-4.4383/R/-44.467/3.2893|-183.3945/81.4414/L/-2.2501/-106.0893/R/2.5032/107.7555|-55.8158/219.8918/L/-43.4966/0.8905/R/79.7368/0.833|63.7894/171.0269/L/-17.0724/19.836|31.8947/138.4504/R/-21.01/23.4413|-55.8158/162.8828/L/28.9274/6.0039/R/-32.5556/-11.5915|-119.6052/73.2973/L/-6.1877/55.07/R/2.6579/-62.4384|-47.8421/-16.2883/L/-26.5789/2.7147/R/34.5526/-5.4294" CenterX="183.4382" CenterY="74.76682"/>
<PolygonObject Name="Polygon9" Left="387.43" Top="595.31" Width="255.17" Height="293.03" Border.Width="3" Fill="LinearGradient" Fill.StartColor="OrangeRed" Fill.EndColor="LimeGreen" Fill.Angle="315" Fill.Focus="1" Fill.Contrast="1" PolyPoints_v2="7.7319/23.7537/R/-20.6185/7.9179|-115.9789/118.7687/L/1.6889/-88.8027/R/-1.1514/106.5058|0/245.4554/L/-57.408/0.9455/R/79.2011/-5.0333|108.247/126.6867/L/-1.4143/64.2889/R/2.5773/-79.1792|23.1958/23.7537/L/25.7731/7.9179|38.6596/-15.8358/L/-12.8865/13.1965/R/30.9277/50.1468|139.1747/23.7537/L/-33.505/10.5572/R/-15.4639/-39.5896|38.6596/-23.7537/L/30.9277/-15.8358/R/12.8865/-13.1965|38.6596/-47.5075/L/7.7319/0/R/-7.7319/-0.4189|23.1958/-31.6717/L/7.7319/-13.1965/R/-4.541/7.7503|7.7319/23.7537/L/-1.7182/-18.9779" CenterX="115.9953" CenterY="47.54402"/>
</DataBand>
<PageFooterBand Name="PageFooter1" Top="662.72" Width="718.2" Height="28.35" Fill.Color="WhiteSmoke">
<PageFooterBand Name="PageFooter1" Top="1008.12" Width="718.2" Height="28.35" Fill.Color="WhiteSmoke">
<TextObject Name="Text31" Left="9.45" Width="217.35" Height="28.35" Cursor="Hand" Hyperlink.Value="https://www.fast-report.com/en/product/fast-report-net/" Text="Generated by FastReport .NET" VertAlign="Center" Font="Tahoma, 8pt, style=Underline" TextFill.Color="Blue"/>
</PageFooterBand>
</ReportPage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<None Update="TestReport.fpx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Watermark.fpx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ public void TestExportPdfInfo()
#pragma warning restore xUnit2009 // Do not use boolean check to check for substrings
}

[Fact]
public void TestExportWatermark()
{
Report r = new Report();
r.LoadPrepared("Watermark.fpx");

PDFSimpleExport export = new PDFSimpleExport();
r.Export(export, "Watermark.pdf");
}

[Fact]
public void TestExportPdfImages()
{
Expand Down
Binary file not shown.
6 changes: 6 additions & 0 deletions FastReport.Base/AssemblyInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public AssemblyInitializer()
RegisteredObjects.AddConnection(typeof(XmlDataConnection));
RegisteredObjects.AddConnection(typeof(CsvDataConnection));

// json
RegisteredObjects.Add(typeof(Data.JsonConnection.JsonTableDataSource), "", 0);
//RegisteredObjects.Add(typeof(Data.JsonConnection.JsonObjectDataSource), "", 0);
//RegisteredObjects.Add(typeof(Data.JsonConnection.JsonArrayDataSource), "", 0);
RegisteredObjects.AddConnection(typeof(Data.JsonConnection.JsonDataSourceConnection));

// formats
RegisteredObjects.Add(typeof(BooleanFormat), "", 0);
RegisteredObjects.Add(typeof(CurrencyFormat), "", 0);
Expand Down
15 changes: 15 additions & 0 deletions FastReport.Base/BandBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public abstract partial class BandBase : BreakableComponent, IParent
private float reprintOffset;
private string beforeLayoutEvent;
private string afterLayoutEvent;
private int repeatBandNTimes = 1;

#endregion

Expand Down Expand Up @@ -67,6 +68,17 @@ public bool StartNewPage
set { startNewPage = value; }
}

/// <summary>
/// Gets or sets a value that determines the number of repetitions of the same band.
/// </summary>
[Category("Behavior")]
[DefaultValue(1)]
public int RepeatBandNTimes
{
get { return repeatBandNTimes; }
set { repeatBandNTimes = value; }
}

/// <summary>
/// Gets or sets a value indicating that the first row can start a new report page.
/// </summary>
Expand Down Expand Up @@ -512,6 +524,7 @@ public override void Assign(Base source)
OutlineExpression = src.OutlineExpression;
BeforeLayoutEvent = src.BeforeLayoutEvent;
AfterLayoutEvent = src.AfterLayoutEvent;
RepeatBandNTimes = src.RepeatBandNTimes;
}

internal virtual void UpdateWidth()
Expand Down Expand Up @@ -631,6 +644,8 @@ public override void Serialize(FRWriter writer)
writer.WriteStr("BeforeLayoutEvent", BeforeLayoutEvent);
if (AfterLayoutEvent != c.AfterLayoutEvent)
writer.WriteStr("AfterLayoutEvent", AfterLayoutEvent);
if (RepeatBandNTimes != c.RepeatBandNTimes)
writer.WriteInt("RepeatBandNTimes", RepeatBandNTimes);
}

internal bool IsColumnDependentBand
Expand Down
2 changes: 1 addition & 1 deletion FastReport.Base/Code/AssemblyDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private void AddReferencedAssemblies(StringCollection assemblies, string default
foreach (string s in Report.ReferencedAssemblies)
{
//TODO thid core directive only for .net standard mode replace with checking the standard
#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NETSTANDARD2_1

if (s == "System.Windows.Forms.dll")
continue;
Expand Down
4 changes: 2 additions & 2 deletions FastReport.Base/Data/DataConnectionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public void CreateAllTables()
/// Fills the <see cref="Tables"/> collection with all tables available in the database.
/// </summary>
/// <param name="initSchema">Set to <b>true</b> to initialize each table's schema.</param>
public void CreateAllTables(bool initSchema)
public virtual void CreateAllTables(bool initSchema)
{
List<string> tableNames = new List<string>();
tableNames.AddRange(GetTableNames());
Expand Down Expand Up @@ -404,7 +404,7 @@ public void CreateAllTables(bool initSchema)
/// <summary>
/// Creates the relations between tables. Applies to XmlDataConnection only.
/// </summary>
public void CreateRelations()
public virtual void CreateRelations()
{
if (Report != null)
{
Expand Down
2 changes: 1 addition & 1 deletion FastReport.Base/Data/DataSourceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public abstract class DataSourceBase : Column
private ArrayList internalRows;
private ArrayList rows;
private int currentRowNo;
private object currentRow;
protected object currentRow;
private Hashtable additionalFilter;
private bool forceLoadData;
private Hashtable columnIndices;
Expand Down
Loading

0 comments on commit 69a0009

Please sign in to comment.