Skip to content

Commit c06747f

Browse files
authored
Merge pull request #189 from FastReports/sync_branch_637255589622841465
Release 2020.3.0
2 parents a769ba9 + 3ef39b2 commit c06747f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2095
-4540
lines changed

Demos/Reports/Barcode.frx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<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">
2+
<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">
33
<Dictionary/>
4-
<ReportPage Name="Page1" RawPaperSize="9" UnlimitedHeight="true">
4+
<ReportPage Name="Page1" RawPaperSize="9" Watermark.Font="Arial, 60pt" UnlimitedHeight="true">
55
<ReportTitleBand Name="ReportTitle1" Width="718.2" Height="85.05" CanGrow="true">
66
<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"/>
77
<TextObject Name="Text30" Top="47.25" Width="718.2" Height="37.8" Text="BarcodeObject" HorzAlign="Center" VertAlign="Center" Font="Tahoma, 14pt, style=Bold"/>
88
</ReportTitleBand>
9-
<DataBand Name="Data1" Top="89.05" Width="718.2" Height="1341.9">
9+
<DataBand Name="Data1" Top="89.05" Width="718.2" Height="1420.4">
1010
<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"/>
1111
<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"/>
1212
<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"/>
@@ -57,11 +57,13 @@
5757
<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"/>
5858
<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"/>
5959
<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"/>
60-
<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"/>
60+
<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"/>
6161
<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"/>
6262
<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"/>
63+
<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"/>
64+
<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"/>
6365
</DataBand>
64-
<PageFooterBand Name="PageFooter1" Top="1434.95" Width="718.2" Height="28.35" Fill.Color="WhiteSmoke">
66+
<PageFooterBand Name="PageFooter1" Top="1513.45" Width="718.2" Height="28.35" Fill.Color="WhiteSmoke">
6567
<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"/>
6668
</PageFooterBand>
6769
</ReportPage>

FastReport.Base/BandBase.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,6 @@ public override float CalcHeight()
815815
return Height;
816816
}
817817

818-
/// <inheritdoc/>
819-
820818
public void AddLastToFooter(BreakableComponent breakTo)
821819
{
822820
float maxTop = (AllObjects[0] as ComponentBase).Top;
@@ -879,7 +877,7 @@ public void AddLastToFooter(BreakableComponent breakTo)
879877
Height -= maxBottom - minTop;
880878
}
881879

882-
880+
/// <inheritdoc/>
883881
public override bool Break(BreakableComponent breakTo)
884882
{
885883
// first we find the break line. It's a minimum Top coordinate of the object that cannot break.

FastReport.Base/Barcode/Barcode2DBase.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@ private void DrawBarcode(IGraphicsRenderer g, float width, float height)
2222

2323
Draw2DBarcode(g, kx, ky);
2424

25-
// draw the text.
25+
//If swiss qr, draw the swiss cross
26+
if (text.StartsWith("SPC"))
27+
{
28+
float top = showText ? height - 21 : height;
29+
g.FillRectangle(Brushes.White, width / 2 - width / 100f * 7, top / 2 - top / 100 * 7, width / 100f * 14, top / 100 * 14);
30+
g.FillRectangle(Brushes.Black, width / 2 - width / 100f * 6, top / 2 - top / 100 * 6, width / 100f * 12, top / 100 * 12);
31+
g.FillRectangle(Brushes.White, width / 2 - width / 100f * 4, top / 2 - top / 100 * 1.5f, width / 100f * 8, top / 100 * 3);
32+
g.FillRectangle(Brushes.White, width / 2 - width / 100f * 1.5f, top / 2 - top / 100 * 4, width / 100f * 3, top / 100 * 8);
33+
}
34+
// draw the text.
2635
if (showText)
2736
{
2837
string data = StripControlCodes(text);
@@ -33,7 +42,7 @@ private void DrawBarcode(IGraphicsRenderer g, float width, float height)
3342
{
3443
g.DrawString(data, drawFont, Brushes.Black, new RectangleF(0, height - 18 * ky, width, 18 * ky));
3544
}
36-
}
45+
}
3746
}
3847

3948
internal virtual void Draw2DBarcode(IGraphicsRenderer g, float kx, float ky)

0 commit comments

Comments
 (0)