-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
FastReport.OpenSource 2024.2.0
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<Import Project="..\..\..\..\UsedPackages.version" /> | ||
<ItemGroup> | ||
<PackageReference Include="FastReport.OpenSource" Version="$(FROSVersion)" /> | ||
<PackageReference Include="FastReport.OpenSource.Export.PdfSimple" Version="$(FROSVersion)" /> | ||
</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 15 | ||
VisualStudioVersion = 15.0.28307.421 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PdfExport", "PdfExport.csproj", "{380E2489-623D-4E0F-9E98-253FC2147DD6}" | ||
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 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {64D0A985-754A-496D-A0AE-9A9D86DEA92D} | ||
EndGlobalSection | ||
EndGlobal |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using FastReport; | ||
using FastReport.Export.PdfSimple; | ||
using FastReport.Utils; | ||
using System; | ||
using System.Data; | ||
using System.Diagnostics; | ||
using System.IO; | ||
|
||
namespace PdfExport | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
string reportsFolder = FindReportsFolder(); | ||
|
||
Report report = new Report(); | ||
report.Load(Path.Combine(reportsFolder, "Simple List.frx")); | ||
|
||
DataSet data = new DataSet(); | ||
data.ReadXml(Path.Combine(reportsFolder, "nwind.xml")); | ||
|
||
report.RegisterData(data, "NorthWind"); | ||
|
||
report.Prepare(); | ||
|
||
PDFSimpleExport pdfExport = new PDFSimpleExport(); | ||
|
||
pdfExport.Export(report, "Simple List.pdf"); | ||
|
||
|
||
} | ||
|
||
|
||
public static string FindReportsFolder() | ||
{ | ||
string FReportsFolder = ""; | ||
string thisFolder = Config.ApplicationFolder; | ||
|
||
for (int i = 0; i < 7; i++) | ||
{ | ||
string dir = Path.Combine(thisFolder, "Reports"); | ||
if (Directory.Exists(dir)) | ||
{ | ||
string rep_dir = Path.GetFullPath(dir); | ||
if (System.IO.File.Exists(Path.Combine(rep_dir, "reports.xml"))) | ||
{ | ||
FReportsFolder = rep_dir; | ||
break; | ||
} | ||
} | ||
thisFolder = Path.Combine(thisFolder, @".."); | ||
} | ||
return FReportsFolder; | ||
} | ||
} | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.