Skip to content

Commit f400491

Browse files
authored
Merge pull request #564 from FastReports/sync_branch_2023.2.0
FastReport.OpenSource 2023.2.0
2 parents f009cb2 + 240d042 commit f400491

File tree

682 files changed

+13685
-136715
lines changed

Some content is hidden

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

682 files changed

+13685
-136715
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<AssemblyName>DataFromArray</AssemblyName>
7+
</PropertyGroup>
8+
9+
<Import Project="..\..\..\..\UsedPackages.version" />
10+
<ItemGroup>
11+
<PackageReference Include="FastReport.OpenSource" Version="$(FROSVersion)" />
12+
</ItemGroup>
13+
14+
<ItemGroup>
15+
<Compile Include ="..\..\_Shared\Utils.cs" />
16+
</ItemGroup>
17+
</Project>
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28307.421
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.4.33205.214
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PdfExport", "PdfExport.csproj", "{380E2489-623D-4E0F-9E98-253FC2147DD6}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataFromArray", "DataFromArray.csproj", "{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{380E2489-623D-4E0F-9E98-253FC2147DD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{380E2489-623D-4E0F-9E98-253FC2147DD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{380E2489-623D-4E0F-9E98-253FC2147DD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{380E2489-623D-4E0F-9E98-253FC2147DD6}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE
2121
EndGlobalSection
2222
GlobalSection(ExtensibilityGlobals) = postSolution
23-
SolutionGuid = {64D0A985-754A-496D-A0AE-9A9D86DEA92D}
23+
SolutionGuid = {A937CA23-F6F1-49DF-AD56-A02DB278C11A}
2424
EndGlobalSection
2525
EndGlobal

Demos/OpenSource/DataFromArray/DataFromArray/Program.cs renamed to Demos/OpenSource/Console apps/DataFromArray/Program.cs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
using FastReport;
2-
using FastReport.Export.Image;
3-
using System;
1+
using System;
42
using System.IO;
3+
using ConsoleAppsUtils;
4+
using FastReport;
5+
using FastReport.Export.Image;
56

67
namespace DataFromArray
78
{
89
class Program
910
{
1011
private static int[] array;
11-
private static string outFolder = @"..\..\..\out\";
12-
private static string inFolder = @"..\..\..\in\";
12+
private static readonly string outFolder;
13+
private static readonly string inFolder;
1314

1415
static Program()
1516
{
1617
inFolder = Utils.FindDirectory("in");
17-
outFolder = Directory.GetParent(inFolder).FullName + "\\out";
18+
outFolder = Path.Combine(Directory.GetParent(inFolder).FullName,"out");
1819
}
1920

2021
private static void CreateArray()
@@ -28,15 +29,16 @@ private static void CreateArray()
2829

2930
static void Main(string[] args)
3031
{
31-
Console.WriteLine("Welcome! Press any key to procced...");
32+
Console.WriteLine("Welcome! \nThis demo shows how to:" +
33+
"\n -create an array\n -register it in report\n -export raw report (.frx) into (.fpx)\nPress any key to proceed...");
3234
Console.ReadKey();
3335
CreateArray();
3436

3537
// create report instance
3638
Report report = new Report();
3739

3840
// load the existing report
39-
report.Load($@"{inFolder}\report.frx");
41+
report.Load(Path.Combine(inFolder,"report.frx"));
4042

4143
// register the array
4244
report.RegisterData(array, "Array");
@@ -45,14 +47,14 @@ static void Main(string[] args)
4547
report.Prepare();
4648

4749
// save prepared report
48-
if (!Directory.Exists(outFolder))
50+
if (!Directory.Exists(outFolder))
4951
Directory.CreateDirectory(outFolder);
50-
report.SavePrepared($@"{outFolder}\Prepared Report.fpx");
52+
report.SavePrepared(Path.Combine(outFolder,"Prepared Report.fpx"));
5153

5254
// export to image
5355
ImageExport image = new ImageExport();
5456
image.ImageFormat = ImageExportFormat.Jpeg;
55-
report.Export(image, $@"{outFolder}\report.jpg");
57+
report.Export(image, Path.Combine(outFolder,"report.jpg"));
5658

5759
// free resources used by report
5860
report.Dispose();
File renamed without changes.

Demos/OpenSource/DataFromBusinessObject/DataFromBusinessObject/Category.cs renamed to Demos/OpenSource/Console apps/DataFromBusinessObject/Category.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
1+
using System.Collections.Generic;
42

53
namespace DataFromBusinessObject
64
{
75
public class Category
86
{
9-
private string FName;
10-
private string FDescription;
11-
private List<Product> FProducts;
7+
private readonly string FName;
8+
private readonly string FDescription;
9+
private readonly List<Product> FProducts;
1210

1311
public string Name
1412
{
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<AssemblyName>DataFromBusinessObject</AssemblyName>
7+
</PropertyGroup>
8+
9+
<Import Project="..\..\..\..\UsedPackages.version" />
10+
<ItemGroup>
11+
<PackageReference Include="FastReport.OpenSource" Version="$(FROSVersion)" />
12+
</ItemGroup>
13+
14+
<ItemGroup>
15+
<Compile Include ="..\..\_Shared\Utils.cs" />
16+
</ItemGroup>
17+
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.4.33205.214
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataFromBusinessObject", "DataFromBusinessObject.csproj", "{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {A937CA23-F6F1-49DF-AD56-A02DB278C11A}
24+
EndGlobalSection
25+
EndGlobal

Demos/OpenSource/DataFromBusinessObject/DataFromBusinessObject/Product.cs renamed to Demos/OpenSource/Console apps/DataFromBusinessObject/Product.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
4-
using System.IO;
5-
6-
namespace DataFromBusinessObject
1+
namespace DataFromBusinessObject
72
{
83
public class Product
94
{
10-
private string FName;
11-
private decimal FUnitPrice;
5+
private readonly string FName;
6+
private readonly decimal FUnitPrice;
127

138
public string Name
149
{

Demos/OpenSource/DataFromBusinessObject/DataFromBusinessObject/Program.cs renamed to Demos/OpenSource/Console apps/DataFromBusinessObject/Program.cs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
using FastReport;
2-
using FastReport.Export.Image;
3-
using System;
1+
using System;
42
using System.Collections.Generic;
53
using System.IO;
4+
using ConsoleAppsUtils;
5+
using FastReport;
6+
using FastReport.Export.Image;
67

78
namespace DataFromBusinessObject
89
{
910
class Program
1011
{
1112
private static List<Category> businessObjects;
12-
private static string outFolder = @"..\..\..\out\";
13-
private static string inFolder = @"..\..\..\in\";
13+
private static readonly string outFolder;
14+
private static readonly string inFolder;
1415

1516
static Program()
1617
{
1718
inFolder = Utils.FindDirectory("in");
18-
outFolder = Directory.GetParent(inFolder).FullName + "\\out";
19+
outFolder = Path.Combine(Directory.GetParent(inFolder).FullName, "out");
1920
}
2021

21-
private static void CreateBusinessObject()
22+
private static void CreateBusinessObject()
2223
{
2324
businessObjects = new List<Category>();
2425

@@ -42,7 +43,7 @@ private static void CreateBusinessObject()
4243

4344
static void Main(string[] args)
4445
{
45-
Console.WriteLine("Welcome! Press any key to procced...");
46+
Console.WriteLine("Welcome! This demo shows how to:\n -create simple business object\n -register this data in report\n -export raw report (.frx) to prepared one (.fpx)\nPress any key to proceed...");
4647
Console.ReadKey();
4748

4849
CreateBusinessObject();
@@ -51,7 +52,7 @@ static void Main(string[] args)
5152
Report report = new Report();
5253

5354
// load the existing report
54-
report.Load($@"{inFolder}\report.frx");
55+
report.Load(Path.Combine(inFolder, "report.frx"));
5556

5657
// register the array
5758
report.RegisterData(businessObjects, "Categories");
@@ -60,14 +61,14 @@ static void Main(string[] args)
6061
report.Prepare();
6162

6263
// save prepared report
63-
if (!Directory.Exists(outFolder))
64+
if (!Directory.Exists(outFolder))
6465
Directory.CreateDirectory(outFolder);
65-
report.SavePrepared($@"{outFolder}\Prepared Report.fpx");
66+
report.SavePrepared(Path.Combine(outFolder, "Prepared Report.fpx"));
6667

6768
// export to image
6869
ImageExport image = new ImageExport();
6970
image.ImageFormat = ImageExportFormat.Jpeg;
70-
report.Export(image, $@"{outFolder}\report.jpg");
71+
report.Export(image, Path.Combine(outFolder, "report.jpg"));
7172

7273
// free resources used by report
7374
report.Dispose();
File renamed without changes.

0 commit comments

Comments
 (0)