Skip to content

Commit

Permalink
Merge pull request #189 from FastReports/sync_branch_637255589622841465
Browse files Browse the repository at this point in the history
Release 2020.3.0
  • Loading branch information
fediachov authored May 20, 2020
2 parents a769ba9 + 3ef39b2 commit c06747f
Show file tree
Hide file tree
Showing 52 changed files with 2,095 additions and 4,540 deletions.
12 changes: 7 additions & 5 deletions Demos/Reports/Barcode.frx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" TextQuality="Regular" ReportInfo.Description="This report demonstrates different barcode types:&#13;&#10;2/5 barcodes (Interleaved, Industrial, Matrix), Codabar, Code39 (Regular, Extended), Code93 (Regular, Extended), Code128 (A, B, C charsets with autoencoding feature), EAN8, EAN13, UPC-A, UPC-E (E0, E1 codes), MSI, PostNet, 2 or 5 digit supplement code for EAN/UPC barcodes, PDF417, Datamatrix, QR Code, Aztec, Plessey, GS1-128 (UCC/EAN-128), Pharmacode, Intelligent Mail (USPS), MaxiCode." ReportInfo.Created="02/21/2008 20:44:59" ReportInfo.Modified="04/28/2017 09:47:10" ReportInfo.CreatorVersion="1.0.0.0">
<Report ScriptLanguage="CSharp" TextQuality="Regular" ReportInfo.Description="This report demonstrates different barcode types:&#13;&#10;2/5 barcodes (Interleaved, Industrial, Matrix), Codabar, Code39 (Regular, Extended), Code93 (Regular, Extended), Code128 (A, B, C charsets with autoencoding feature), EAN8, EAN13, UPC-A, UPC-E (E0, E1 codes), MSI, PostNet, 2 or 5 digit supplement code for EAN/UPC barcodes, PDF417, Datamatrix, QR Code, Aztec, Plessey, GS1-128 (UCC/EAN-128), Pharmacode, Intelligent Mail (USPS), MaxiCode, Swiss QR Code." ReportInfo.Created="02/21/2008 20:44:59" ReportInfo.Modified="05/13/2020 15:16:56" ReportInfo.CreatorVersion="1.0.0.0">
<Dictionary/>
<ReportPage Name="Page1" RawPaperSize="9" UnlimitedHeight="true">
<ReportPage Name="Page1" RawPaperSize="9" Watermark.Font="Arial, 60pt" UnlimitedHeight="true">
<ReportTitleBand Name="ReportTitle1" Width="718.2" Height="85.05" CanGrow="true">
<TextObject Name="Text29" 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="47.25" Width="718.2" Height="37.8" Text="BarcodeObject" HorzAlign="Center" VertAlign="Center" Font="Tahoma, 14pt, style=Bold"/>
</ReportTitleBand>
<DataBand Name="Data1" Top="89.05" Width="718.2" Height="1341.9">
<DataBand Name="Data1" Top="89.05" Width="718.2" Height="1420.4">
<TextObject Name="Text61" Left="236.25" Top="1105.65" Width="226.8" Height="226.8" Border.Lines="Left, Right, Bottom" Border.Color="Silver" Text="MaxiCode" Padding="2, 10, 2, 0" HorzAlign="Center" Font="Tahoma, 8pt"/>
<TextObject Name="Text32" Left="9.45" Top="37.8" Width="170.1" Height="132.3" Border.Lines="Left, Right, Bottom" Border.Color="Silver" Text="2/5 Interleaved" Padding="2, 10, 2, 0" HorzAlign="Center" Font="Tahoma, 8pt"/>
<TextObject Name="Text33" Left="179.55" Top="37.8" Width="170.1" Height="132.3" Border.Lines="Left, Right, Bottom" Border.Color="Silver" Text="2/5 Industrial" Padding="2, 10, 2, 0" HorzAlign="Center" Font="Tahoma, 8pt"/>
Expand Down Expand Up @@ -57,11 +57,13 @@
<TextObject Name="Text60" Left="236.25" Top="878.85" Width="226.8" Height="226.8" Border.Lines="Left, Right, Bottom" Border.Color="Silver" Text="Aztec Code" Padding="2, 10, 2, 0" HorzAlign="Center" Font="Tahoma, 8pt"/>
<BarcodeObject Name="Barcode42" Left="274.05" Top="1152.9" Width="154.5" Height="154.5" AutoSize="false" Text="http://fast-report.com" ShowText="false" AllowExpressions="true" Barcode="MaxiCode" Barcode.Mode="4"/>
<BarcodeObject Name="Barcode43" Left="37.8" Top="1171.8" Width="171.05" Height="111.35" AutoSize="false" ShowText="false" Barcode="PDF417" Barcode.AspectRatio="0.5" Barcode.Columns="0" Barcode.Rows="0" Barcode.CodePage="437" Barcode.CompactionMode="Auto" Barcode.ErrorCorrection="Auto" Barcode.PixelSize="1, 5"/>
<BarcodeObject Name="Barcode44" Left="510.3" Top="926.1" Width="128.7" Height="128.7" AutoSize="false" ShowText="false" AllowExpressions="true" Barcode="Datamatrix" Barcode.SymbolSize="Size24x24" Barcode.Encoding="Auto" Barcode.CodePage="1252" Barcode.PixelSize="3"/>
<BarcodeObject Name="Barcode44" Left="510.3" Top="926.1" Width="128.7" Height="128.7" AutoSize="false" ShowText="false" AllowExpressions="true" Barcode="Datamatrix" Barcode.SymbolSize="Size24x24" Barcode.Encoding="Auto" Barcode.CodePage="1252" Barcode.PixelSize="3" Barcode.AutoEncode="true"/>
<BarcodeObject Name="Barcode45" Left="56.7" Top="926.1" Width="132.3" Height="132.3" AutoSize="false" Text="http://fast-report.com" ShowText="false" AllowExpressions="true" Barcode="QR Code" Barcode.ErrorCorrection="L" Barcode.Encoding="UTF8" Barcode.QuietZone="false"/>
<BarcodeObject Name="Barcode46" Left="283.5" Top="926.1" Width="135.6" Height="135.6" AutoSize="false" Text="http://fast-report.com" ShowText="false" AllowExpressions="true" Barcode="Aztec" Barcode.ErrorCorrection="33"/>
<TextObject Name="Text62" Left="462.72" Top="1105.65" Width="226.8" Height="226.8" Border.Lines="Right, Bottom" Border.Color="Silver" Text="Swiss QR Code" Padding="2, 10, 2, 0" HorzAlign="Center" Font="Tahoma, 8pt"/>
<BarcodeObject Name="Barcode47" Left="499.2" Top="1152" Width="154.4" Height="154.4" AutoSize="false" Text="SPC&#13;&#10;0200&#13;&#10;1&#13;&#10;CH4431999123000889012&#13;&#10;S&#13;&#10;FastReports&#13;&#10;North Pitt Str&#13;&#10;901&#13;&#10;123456&#13;&#10;Alexandria&#13;&#10;US&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;1000&#13;&#10;EUR&#13;&#10;S&#13;&#10;Debitor&#13;&#10;Street&#13;&#10;1&#13;&#10;1234&#13;&#10;City&#13;&#10;AG&#13;&#10;QRR&#13;&#10;210000000003139471430009017&#13;&#10;Unstructured message&#13;&#10;EPD&#13;&#10;Bill information&#13;&#10;Alt 1&#13;&#10;Alt 2" ShowText="false" AllowExpressions="true" Barcode="QR Code" Barcode.ErrorCorrection="M" Barcode.Encoding="UTF8" Barcode.QuietZone="false"/>
</DataBand>
<PageFooterBand Name="PageFooter1" Top="1434.95" Width="718.2" Height="28.35" Fill.Color="WhiteSmoke">
<PageFooterBand Name="PageFooter1" Top="1513.45" 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
4 changes: 1 addition & 3 deletions FastReport.Base/BandBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,6 @@ public override float CalcHeight()
return Height;
}

/// <inheritdoc/>

public void AddLastToFooter(BreakableComponent breakTo)
{
float maxTop = (AllObjects[0] as ComponentBase).Top;
Expand Down Expand Up @@ -879,7 +877,7 @@ public void AddLastToFooter(BreakableComponent breakTo)
Height -= maxBottom - minTop;
}


/// <inheritdoc/>
public override bool Break(BreakableComponent breakTo)
{
// first we find the break line. It's a minimum Top coordinate of the object that cannot break.
Expand Down
13 changes: 11 additions & 2 deletions FastReport.Base/Barcode/Barcode2DBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ private void DrawBarcode(IGraphicsRenderer g, float width, float height)

Draw2DBarcode(g, kx, ky);

// draw the text.
//If swiss qr, draw the swiss cross
if (text.StartsWith("SPC"))
{
float top = showText ? height - 21 : height;
g.FillRectangle(Brushes.White, width / 2 - width / 100f * 7, top / 2 - top / 100 * 7, width / 100f * 14, top / 100 * 14);
g.FillRectangle(Brushes.Black, width / 2 - width / 100f * 6, top / 2 - top / 100 * 6, width / 100f * 12, top / 100 * 12);
g.FillRectangle(Brushes.White, width / 2 - width / 100f * 4, top / 2 - top / 100 * 1.5f, width / 100f * 8, top / 100 * 3);
g.FillRectangle(Brushes.White, width / 2 - width / 100f * 1.5f, top / 2 - top / 100 * 4, width / 100f * 3, top / 100 * 8);
}
// draw the text.
if (showText)
{
string data = StripControlCodes(text);
Expand All @@ -33,7 +42,7 @@ private void DrawBarcode(IGraphicsRenderer g, float width, float height)
{
g.DrawString(data, drawFont, Brushes.Black, new RectangleF(0, height - 18 * ky, width, 18 * ky));
}
}
}
}

internal virtual void Draw2DBarcode(IGraphicsRenderer g, float kx, float ky)
Expand Down
Loading

0 comments on commit c06747f

Please sign in to comment.