Skip to content

Commit

Permalink
* sync 3/13/2023 version: 2023.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FastReports-bot committed Mar 13, 2023
1 parent f009cb2 commit 240d042
Show file tree
Hide file tree
Showing 682 changed files with 13,685 additions and 136,715 deletions.
17 changes: 17 additions & 0 deletions Demos/OpenSource/Console apps/DataFromArray/DataFromArray.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>DataFromArray</AssemblyName>
</PropertyGroup>

<Import Project="..\..\..\..\UsedPackages.version" />
<ItemGroup>
<PackageReference Include="FastReport.OpenSource" Version="$(FROSVersion)" />
</ItemGroup>

<ItemGroup>
<Compile Include ="..\..\_Shared\Utils.cs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.421
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PdfExport", "PdfExport.csproj", "{380E2489-623D-4E0F-9E98-253FC2147DD6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataFromArray", "DataFromArray.csproj", "{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{380E2489-623D-4E0F-9E98-253FC2147DD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{380E2489-623D-4E0F-9E98-253FC2147DD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{380E2489-623D-4E0F-9E98-253FC2147DD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{380E2489-623D-4E0F-9E98-253FC2147DD6}.Release|Any CPU.Build.0 = Release|Any CPU
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {64D0A985-754A-496D-A0AE-9A9D86DEA92D}
SolutionGuid = {A937CA23-F6F1-49DF-AD56-A02DB278C11A}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
using FastReport;
using FastReport.Export.Image;
using System;
using System;
using System.IO;
using ConsoleAppsUtils;
using FastReport;
using FastReport.Export.Image;

namespace DataFromArray
{
class Program
{
private static int[] array;
private static string outFolder = @"..\..\..\out\";
private static string inFolder = @"..\..\..\in\";
private static readonly string outFolder;
private static readonly string inFolder;

static Program()
{
inFolder = Utils.FindDirectory("in");
outFolder = Directory.GetParent(inFolder).FullName + "\\out";
outFolder = Path.Combine(Directory.GetParent(inFolder).FullName,"out");
}

private static void CreateArray()
Expand All @@ -28,15 +29,16 @@ private static void CreateArray()

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

// create report instance
Report report = new Report();

// load the existing report
report.Load($@"{inFolder}\report.frx");
report.Load(Path.Combine(inFolder,"report.frx"));

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

// save prepared report
if (!Directory.Exists(outFolder))
if (!Directory.Exists(outFolder))
Directory.CreateDirectory(outFolder);
report.SavePrepared($@"{outFolder}\Prepared Report.fpx");
report.SavePrepared(Path.Combine(outFolder,"Prepared Report.fpx"));

// export to image
ImageExport image = new ImageExport();
image.ImageFormat = ImageExportFormat.Jpeg;
report.Export(image, $@"{outFolder}\report.jpg");
report.Export(image, Path.Combine(outFolder,"report.jpg"));

// free resources used by report
report.Dispose();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.Generic;

namespace DataFromBusinessObject
{
public class Category
{
private string FName;
private string FDescription;
private List<Product> FProducts;
private readonly string FName;
private readonly string FDescription;
private readonly List<Product> FProducts;

public string Name
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>DataFromBusinessObject</AssemblyName>
</PropertyGroup>

<Import Project="..\..\..\..\UsedPackages.version" />
<ItemGroup>
<PackageReference Include="FastReport.OpenSource" Version="$(FROSVersion)" />
</ItemGroup>

<ItemGroup>
<Compile Include ="..\..\_Shared\Utils.cs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataFromBusinessObject", "DataFromBusinessObject.csproj", "{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E91AE09-9E37-4CEE-A173-D31F9F35A50A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A937CA23-F6F1-49DF-AD56-A02DB278C11A}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace DataFromBusinessObject
namespace DataFromBusinessObject
{
public class Product
{
private string FName;
private decimal FUnitPrice;
private readonly string FName;
private readonly decimal FUnitPrice;

public string Name
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
using FastReport;
using FastReport.Export.Image;
using System;
using System;
using System.Collections.Generic;
using System.IO;
using ConsoleAppsUtils;
using FastReport;
using FastReport.Export.Image;

namespace DataFromBusinessObject
{
class Program
{
private static List<Category> businessObjects;
private static string outFolder = @"..\..\..\out\";
private static string inFolder = @"..\..\..\in\";
private static readonly string outFolder;
private static readonly string inFolder;

static Program()
{
inFolder = Utils.FindDirectory("in");
outFolder = Directory.GetParent(inFolder).FullName + "\\out";
outFolder = Path.Combine(Directory.GetParent(inFolder).FullName, "out");
}

private static void CreateBusinessObject()
private static void CreateBusinessObject()
{
businessObjects = new List<Category>();

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

static void Main(string[] args)
{
Console.WriteLine("Welcome! Press any key to procced...");
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...");
Console.ReadKey();

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

// load the existing report
report.Load($@"{inFolder}\report.frx");
report.Load(Path.Combine(inFolder, "report.frx"));

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

// save prepared report
if (!Directory.Exists(outFolder))
if (!Directory.Exists(outFolder))
Directory.CreateDirectory(outFolder);
report.SavePrepared($@"{outFolder}\Prepared Report.fpx");
report.SavePrepared(Path.Combine(outFolder, "Prepared Report.fpx"));

// export to image
ImageExport image = new ImageExport();
image.ImageFormat = ImageExportFormat.Jpeg;
report.Export(image, $@"{outFolder}\report.jpg");
report.Export(image, Path.Combine(outFolder, "report.jpg"));

// free resources used by report
report.Dispose();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>DataFromDataSet</AssemblyName>
</PropertyGroup>

<Import Project="..\..\..\..\UsedPackages.version" />
<ItemGroup>
<PackageReference Include="FastReport.OpenSource" Version="$(FROSVersion)" />
</ItemGroup>

<ItemGroup>
<Compile Include ="..\..\_Shared\Utils.cs" />
</ItemGroup>
</Project>
25 changes: 25 additions & 0 deletions Demos/OpenSource/Console apps/DataFromDataSet/DataFromDataSet.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataFromDataSet", "DataFromDataSet.csproj", "{A4F0A065-8593-4327-8477-26DC3A61112E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A4F0A065-8593-4327-8477-26DC3A61112E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4F0A065-8593-4327-8477-26DC3A61112E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4F0A065-8593-4327-8477-26DC3A61112E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4F0A065-8593-4327-8477-26DC3A61112E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {56E99ADB-C21D-4B2C-B24B-F44860EC9587}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
using FastReport;
using FastReport.Export.Image;
using System;
using System;
using System.Data;
using System.IO;
using ConsoleAppsUtils;
using FastReport;
using FastReport.Export.Image;

namespace DataFromDataSet
{
class Program
{
private static DataSet dataSet;
private static string outFolder = @"..\..\..\out\";
private static string inFolder = @"..\..\..\in\";
private static readonly string outFolder;
private static readonly string inFolder;

static Program()
{
inFolder = Utils.FindDirectory("in");
outFolder = Directory.GetParent(inFolder).FullName + "\\out";
outFolder = Path.Combine(Directory.GetParent(inFolder).FullName, "out");
}

private static void CreateDataSet()
Expand All @@ -37,15 +38,16 @@ private static void CreateDataSet()

static void Main(string[] args)
{
Console.WriteLine("Welcome! Press any key to procced...");
Console.WriteLine("Welcome! \nThis demo shows how to:\n -create a simple data set\n -add it to the report" +
"\n -export raw report (.frx) to prepared one (.fpx).\nPress any key to proceed...");
Console.ReadKey();
CreateDataSet();

// create report instance
Report report = new Report();

// load the existing report
report.Load($@"{inFolder}\report.frx");
report.Load(Path.Combine(inFolder, "report.frx"));

// register the dataset
report.RegisterData(dataSet);
Expand All @@ -56,12 +58,12 @@ static void Main(string[] args)
// save prepared report
if (!Directory.Exists(outFolder))
Directory.CreateDirectory(outFolder);
report.SavePrepared($@"{outFolder}\Prepared Report.fpx");
report.SavePrepared(Path.Combine(outFolder, "Prepared Report.fpx"));

// export to image
ImageExport image = new ImageExport();
image.ImageFormat = ImageExportFormat.Jpeg;
report.Export(image, $@"{outFolder}\report.jpg");
report.Export(image, Path.Combine(outFolder, "report.jpg"));

// free resources used by report
report.Dispose();
Expand Down
Loading

0 comments on commit 240d042

Please sign in to comment.