Compare commits

...

4 Commits

Author SHA1 Message Date
5ce3b3fa53 FastReport Designer 2026-01-13 19:40:13 +01:00
938050055f FastReportCliGenerator 2026-01-13 14:36:37 +01:00
5696edf0b0 Helper buildSafePath 2026-01-13 14:35:52 +01:00
6414abf7b5 Utilidad FastReport 2026-01-08 13:09:24 +01:00
64 changed files with 3077 additions and 0 deletions

View File

@ -5,5 +5,6 @@ export * from "./patch-field";
export * from "./result";
export * from "./result-collection";
export * from "./rule-validator";
export * from "./safe-path";
export * from "./types";
export * from "./utils";

View File

@ -0,0 +1,79 @@
import path from "node:path";
/**
* Construye rutas de filesystem POSIX de forma segura.
*
* Garantías:
* - Previene path traversal
* - Elimina caracteres no seguros
* - Siempre resuelve dentro de basePath
* - Fail-fast si no es posible construir una ruta válida
*
* Pensado para Unix/Linux.
*/
export interface SafePathOptions {
basePath: string;
segments: string[];
filename?: string;
}
export function buildSafePath(options: SafePathOptions): string {
const { basePath, segments, filename } = options;
if (!basePath) {
throw new Error("basePath is required");
}
const safeSegments = segments.map(sanitizeSegment);
const relativePath = filename
? path.posix.join(...safeSegments, sanitizeFilename(filename))
: path.posix.join(...safeSegments);
const absolutePath = path.resolve(basePath, relativePath);
const normalizedBasePath = path.resolve(basePath);
// 🔐 Defensa CRÍTICA contra path traversal
if (!absolutePath.startsWith(normalizedBasePath + path.sep)) {
throw new Error(`Resolved path escapes basePath: ${absolutePath}`);
}
return absolutePath;
}
/**
* Sanitiza un segmento de path (directorio).
* Whitelist estricta.
*/
function sanitizeSegment(value: string): string {
const sanitized = value
.normalize("NFKD")
.replace(/[^a-zA-Z0-9-_]/g, "-")
.replace(/-+/g, "-")
.replace(/^-|-$/g, "")
.toLowerCase();
if (!sanitized) {
throw new Error(`Invalid path segment: "${value}"`);
}
return sanitized;
}
/**
* Sanitiza un nombre de fichero.
* Mantiene la extensión.
*/
function sanitizeFilename(filename: string): string {
const ext = path.extname(filename);
const name = path.basename(filename, ext);
const safeName = sanitizeSegment(name);
if (!ext || ext.length > 10) {
throw new Error(`Invalid or missing file extension in "${filename}"`);
}
return `${safeName}${ext.toLowerCase()}`;
}

38
scripts/build-fastreport-cli.sh Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -e
SCRIPT_VERSION="0.0.1"
# =====================================================
# FASTREPORT CLI Build Script
# -----------------------------------------------------
# Generación de ejecutables .NET para Linux y Windows
# =====================================================
# Uso:
# ./build-fastreport-cli.sh
#
# =====================================================
PROJECT="../tools/fastreport-cli/FastReportCliGenerator.csproj"
OUTPUT="../tools/fastreport-cli/publish"
CONFIG="Release"
echo "🛠️ Build para Linux x64..."
dotnet publish "$PROJECT" \
-c $CONFIG \
-r linux-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-o "$OUTPUT/linux"
echo "🛠️ Build para Windows x64..."
dotnet publish "$PROJECT" \
-c $CONFIG \
-r win-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-o "$OUTPUT/windows"
echo "✅ Builds generados en $OUTPUT/"

484
tools/fastreport-cli/.gitignore vendored Normal file
View File

@ -0,0 +1,484 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from `dotnet new gitignore`
# dotenv files
.env
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
# publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
.idea
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# Vim temporary swap files
*.swp

View File

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup>
<Version>1.1</Version>
<AssemblyVersion>1.1.0.8</AssemblyVersion>
<FileVersion>1.1.0.8</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FastReport.Data.Json" Version="2026.1.2" />
<PackageReference Include="FastReport.OpenSource" Version="2026.1.3" />
<PackageReference Include="FastReport.OpenSource.Export.PdfSimple" Version="2026.1.3" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<Solution>
<Project Path="FastReportCliGenerator.csproj" />
</Solution>

View File

@ -0,0 +1,182 @@
using System.Reflection;
using FastReport;
using FastReport.Data.JsonConnection;
using FastReport.Export.Html;
using FastReport.Export.PdfSimple;
class Program
{
static int Main(string[] args)
{
var options = ParseArgs(args);
// --version
if (options.ContainsKey("version"))
{
PrintVersion();
return 0;
}
// --help o sin argumentos
if (options.ContainsKey("help") || options.Count == 0)
{
PrintHelp();
return 0;
}
// Validación de obligatorios
if (!options.TryGetValue("template", out var frxPath) ||
!options.TryGetValue("data", out var jsonPath) ||
!options.TryGetValue("output", out var outputPath))
{
Console.Error.WriteLine("❌ Missing required arguments.\n");
PrintHelp();
return 1;
}
var format = options.TryGetValue("format", out var f)
? f.ToLowerInvariant()
: "pdf";
try
{
// Leer JSON en memoria
string jsonData = File.ReadAllText(jsonPath);
// 2) Busca la conexión JSON ya definida
var builder = new JsonDataSourceConnectionStringBuilder();
builder.Json = jsonData;
JsonDataSourceConnection jsonConn = new JsonDataSourceConnection();
using var report = new Report();
// Cargar el informe
report.Load(frxPath);
foreach (var conn in report.Dictionary.Connections)
{
Console.WriteLine($"Connection found: {conn.ToString()} ({conn.GetType().Name})");
if (conn is JsonDataSourceConnection jdc)
{
jsonConn = jdc;
break;
}
}
if (jsonConn == null)
{
throw new Exception("No JSON data connection found in report.");
}
// 3) Cambia la cadena de conexión para usar el JSON real
jsonConn.ConnectionString = builder.ToString();
// 4) Crea las tablas internas basadas en ese JSON
jsonConn.CreateAllTables();
// 5) Preparar el reporte
report.Prepare();
if (format == "pdf")
{
// Exportar a PDF
using var pdfExport = new PDFSimpleExport();
using var fs = new FileStream(outputPath, FileMode.Create);
pdfExport.Export(report, fs);
Console.WriteLine($"Generated PDF: {outputPath}");
}
else
{
// Exportar a HTML
using var htmlExport = new HTMLExport
{
EmbedPictures = true,
SinglePage = true,
SubFolder = false
};
using var fs = new FileStream(outputPath, FileMode.Create);
report.Export(htmlExport, fs);
Console.WriteLine($"Generated HTML: {outputPath}");
}
return 0;
}
catch (Exception ex)
{
Console.Error.WriteLine("Error generating report: " + ex.Message);
return 2;
}
}
// ----------------------------
// Helpers
// ----------------------------
static Dictionary<string, string> ParseArgs(string[] args)
{
var dict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
foreach (var arg in args)
{
if (!arg.StartsWith("--"))
continue;
var parts = arg.Substring(2).Split('=', 2);
if (parts.Length == 1)
dict[parts[0]] = "true"; // flags: --help, --version
else
dict[parts[0]] = parts[1];
}
return dict;
}
static void PrintVersion()
{
var version = Assembly.GetExecutingAssembly().GetName().Version;
Console.WriteLine();
Console.WriteLine($"FastReportCliGenerator version {version}");
}
static void PrintHelp()
{
PrintVersion();
Console.WriteLine(@"
Usage:
FastReportCliGenerator \
--template=<file.frx> \
--data=<data.json> \
--output=<output.html|pdf> \
[--format=html|pdf]
Options:
--template Path to FRX template (required)
--data Path to JSON data file (required)
--output Output file path (required)
--format html or pdf (default)
--version Show version and exit
--help Show this help
Examples:
FastReportCliGenerator \
--template=invoice.frx \
--data=invoice.json \
--output=invoice.html
FastReportCliGenerator \
--template=invoice.frx \
--data=invoice.json \
--output=invoice.pdf \
--format=pdf
");
}
}

View File

@ -0,0 +1,153 @@
# 📘 FastReport CLI — Generador de informes HTML/PDF
Este proyecto es un **ejecutable .NET CLI** que carga plantillas `.frx`, inyecta datos en formato JSON usando **JsonDataConnection** y exporta el informe resultante a **HTML**. Ideal para integrarse desde otros servicios (p. ej., Node.js) y generar facturas, listados u otros documentos.
## 🛠️ Requisitos previos
Antes de compilar o ejecutar este proyecto, necesitas:
### 💡 1. **Instalar .NET 10 SDK**
.NET 10 es la versión recomendada con soporte moderno (mensajes y descargas oficiales disponibles en la web de Microsoft). [Microsoft](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)
### 🐧 **Ubuntu / Linux**
1. Abre una terminal.
2. Actualiza la caché de paquetes:
3. Instala el SDK de .NET 10:
4. Verifica la instalación:
Esto instalará las herramientas necesarias para compilar y ejecutar aplicaciones .NET. [Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install)
**Nota:** Si no está disponible en los repositorios puede que necesites usar el script oficial `dotnet-install.sh` o los paquetes binarios de la web de .NET. [Microsoft Learn](https://learn.microsoft.com/es-es/dotnet/core/install/linux-scripted-manual)
### 🪟 **Windows**
1. Descarga el instalador del SDK de .NET 10 desde la página oficial de descargas de .NET. [Microsoft](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)
2. Ejecuta el instalador y sigue los pasos.
3. Verifica con:
Windows instalará todo lo necesario para compilar y ejecutar proyectos .NET.
## 📁 Estructura del proyecto
El proyecto CLI está bajo una carpeta como:
Este proyecto usa **FastReport.OpenSource** y **JsonDataConnection** para leer JSON y producir HTML.
## 🧱 Compilar el ejecutable
Una vez instalado .NET 10 SDK, abre la terminal o línea de comando en la raíz del proyecto y ejecuta:
Esto compilará el proyecto en modo `Release`.
## 📦 Publicar ejecutables (Linux y Windows)
Puedes generar **ejecutables independientes (self-contained)** para cada plataforma.
### 🐧 Linux
### 🪟 Windows
Esto generará binarios en:
Los ejecutables **no requieren .NET preinstalado** para ejecutarse.
## 🧪 Ejecutar el generador
Una vez publicado, puedes ejecutar el generador desde shell con:
o en Windows.
## 📌 Integración desde otras aplicaciones
Puedes invocar este ejecutable desde Node.js u otros servicios usando la ruta y parámetros indicados, por ejemplo usando `child_process` en Node.js para generar HTML y luego convertirlo a PDF con Puppeteer o similar.
## ⚠️ Requisitos adicionales en Linux
Si tu reporte usa gráficos o fuentes, puede necesitar librerías gráficas nativas como **libgdiplus** en Linux para compatibilidad con System.Drawing:
Esto evita errores de carga nativa en tiempo de ejecución (especialmente si FastReport genera gráficos o renderiza texto). (Requisito común para librerías que usan GDI+ en Linux)
## 🧠 Buenas prácticas
- Mantén tu `.frx` y tus datos JSON sincronizados (los campos usados en la plantilla deben estar presentes en tu JSON).
- Versiona el ejecutable en tus pipelines o CI para que siempre sepas qué versión se está usando.
- Genera el HTML desde .NET y luego conviértelo a PDF en tu API principal según necesites.
## 📦 Resumen de comandos útiles
| Acción | Comando |
| ------------------------------ | ------------------------------------------------------------ |
| Instalar .NET 10 SDK en Ubuntu | `sudo apt install -y dotnet-sdk-10.0` ([Microsoft Learn][1]) |
| Ver versión de .NET | `dotnet --version` |
| Compilar proyecto | `dotnet build …` |
| Publicar para Linux | `dotnet publish … -r linux-x64` |
| Publicar para Windows | `dotnet publish … -r win-x64` |
[1]: https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install?utm_source=chatgpt.com "Install .NET SDK or .NET Runtime on Ubuntu"
## 📚 Recursos
- Página oficial de descargas de **.NET 10** — [https://dotnet.microsoft.com/en-US/download/dotnet/10.0](https://dotnet.microsoft.com/en-US/download/dotnet/10.0) [Microsoft](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)
- Documentación de instalación de .NET en **Ubuntu** — [https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install](https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install) [Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install)
- Documentación de instalación en **Windows** — [https://learn.microsoft.com/es-es/dotnet/core/install/windows](https://learn.microsoft.com/es-es/dotnet/core/install/windows) [Microsoft Learn](https://learn.microsoft.com/es-es/dotnet/core/install/windows)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-13.0.0.1" newVersion="13.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2"/>
</System.Windows.Forms.ApplicationConfigurationSection>
</configuration>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-13.0.0.1" newVersion="13.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,148 @@
[![Visits Badge](https://badges.pufler.dev/visits/FastReports/FastReport)](https://github.com/FastReports/FastReport) [![Created Badge](https://badges.pufler.dev/created/FastReports/FastReport)](https://github.com/FastReports/FastReport) [![Twitter Follow](https://img.shields.io/twitter/follow/fastreports?style=social)](https://twitter.com/FastReports) [![Channel on Telegram](https://img.shields.io/badge/Channel%20on-Telegram-brightgreen.svg)](https://t.me/fastreport_open_source) [![Chat on Telegram](https://img.shields.io/badge/Chat%20on-Telegram-brightgreen.svg)](https://t.me/joinchat/hs87tfi79Rg3OGQy)
[![FastReport Open Source](https://fastreports.github.io/FastReport.Documentation/images/fros-youtube-title.jpg)](https://youtu.be/Js78gl_xAOU)
## What is FastReport?
FastReport provides free open source report generator for .NET 6/.NET Core/.NET Framework. You can use the FastReport Open Source in MVC, Web API, console applications.
[![Image of FastReport](https://raw.githubusercontent.com/FastReports/FastReport.Documentation/master/images/FastReport-screenshot2-small.png)](https://raw.githubusercontent.com/FastReports/FastReport.Documentation/master/images/FastReport-screenshot2.png)
## Features
FastReport is written in C# and it is compatible with .NET Standard 2.0 and higher. Extendable FastReport architecture allows creating your own objects, export filters, wizards and DB engines.
[![Image of FastReport](https://raw.githubusercontent.com/FastReports/FastReport.Documentation/master/images/FastReport-screenshot1-small.png)](https://raw.githubusercontent.com/FastReports/FastReport.Documentation/master/images/FastReport-screenshot1.png)
### Report Objects
- FastReport is a band-oriented report generator. There are 13 types of bands available: Report Title, Report Summary, Page Header, Page Footer, Column Header, Column Footer, Data Header, Data, Data Footer, Group Header, Group Footer, Child and Overlay. In addition, sub-reports are fully supported.
- A wide range of band types allows creating any kind of report: list, master-detail, group, multi-column, master-detail-detail and many more.
- Wide range of available report objects : text, picture, line, shape, barcode, matrix, table, checkbox.
- Reports can consist of several design pages, which allows reports to contain a cover, the data and a back cover, all in one file.
- The Table object allows building a tabular report with variable number of rows and/or columns, just like in MS Excel. Aggregate functions are also available.
- Powerful, fully configurable Matrix object that can be used to print pivot tables.
- Report inheritance. For creating many reports with common elements such as titles, logos or footers you can place all the common elements in a base report and inherit all other reports from this base.
### Data Sources
- You can get data from XML, CSV, Json, MS SQL, MySql, Oracle, Postgres, MongoDB, Couchbase, RavenDB, SQLite.
- FastReport has ability to get data from business objects of IEnumerable type.
- Report can contain data sources (tables, queries, DB connections).
- Thus you can not only use application-defined datasets but also connect to any database and use tables and queries directly within the report.
### Internal Scripting
FastReport has a built-in script engine that supports two .NET languages, C# and VB.NET. You can use all of the .NET power in your reports to perform complex data handling and much more.
## Working with report templates
You can make a report template in several ways:
- Creating report from code.
- Developing report template as XML file.
- Using the [FastReport Online Designer](https://fast-report.com/en/product/fast-report-online-designer/).
- Using the FastReport Designer Community Edition (freeware). It can be downloaded from [FastReport releases page](https://github.com/FastReports/FastReport/releases).
[![Image of FastReport](https://raw.githubusercontent.com/FastReports/FastReport.Documentation/master/images/FastReport-screenshot3-small.png)](https://raw.githubusercontent.com/FastReports/FastReport.Documentation/master/images/FastReport-screenshot3.png)
## Exporting
FastReport Open Source can save documents in HTML, BMP, PNG, JPEG, GIF, TIFF, EMF.
**PDF** export is available as a [plugin](https://github.com/FastReports/FastReport/tree/master/Extras/OpenSource/FastReport.OpenSource.Export.PdfSimple). You can see an example of its use [here](https://github.com/FastReports/FastReport/tree/master/Demos/OpenSource/Console%20apps/PdfExport). If this export is not enough for you and you need a full-featured PDF export with encryption, digital signing and fonts embedding - take a look at [FastReport .NET Core](https://fast-report.com/en/product/fast-report-net/).
## Report Designer Community Edition
To edit reports, we made a special report designer build - [FastReport Designer Community Edition](https://github.com/FastReports/FastReport/releases/latest). The program is intended for use in the Windows operating system and contains all the limitations of the Open Source version. We do not supply the source code of the editor because it is part of the commercial product [FastReport .NET](https://www.fast-report.com/en/product/fast-report-net/). Publishing this program is our good will and our wish. The MIT license does not cover its source code.
## Installation
FastReport can be compiled from sources or installed from [NuGet packages](https://www.nuget.org/profiles/FastReports).
### Compilation
1. Install .NET 5 SDK for your OS from https://www.microsoft.com/net/download
2. Follow the commands
```sh
# for windows users
git clone https://github.com/FastReports/FastReport.git
cd FastReport
pack.bat
```
```sh
# for linux users
git clone https://github.com/FastReports/FastReport.git
cd FastReport
chmod 777 pack.sh && ./pack.sh
```
The package is located at `fr_packages` directory.
### NuGet
You can add FastReport to your current project via NuGet package manager:
```
Install-Package FastReport.OpenSource
Install-Package FastReport.OpenSource.Web
```
## Extras
The Extras folder contains additional modules that extend FastReport functionality:
- [Core/FastReport.Data](https://github.com/FastReports/FastReport/tree/master/Extras/Core/FastReport.Data) - connectors to various databases;
- [OpenSource/FastReport.OpenSource.Export.PdfSimple](https://github.com/FastReports/FastReport/tree/master/Extras/OpenSource/FastReport.OpenSource.Export.PdfSimple) - simple export in PDF format;
- [ReportBuilder](https://github.com/FastReports/FastReport/tree/master/Extras/ReportBuilder) - a simple report builder from code without using templates.
## Examples
In the [Demos](https://github.com/FastReports/FastReport/tree/master/Demos) folder you can see examples of using FastReport.
## Bug Reports
See the [Issues](https://github.com/FastReports/FastReport/issues) section of website. When describing the issue, please attach screenshots or examples to help reproduce the problem.
## Contributors
This project exists because of all the people who have contributed and continue to work on the project:
[@ATZ-FR](https://github.com/ATZ-FR), [@Detrav](https://github.com/Detrav), [@fediachov](https://github.com/fediachov), [@8VAid8](https://github.com/8VAid8),
[@KirillKornienko](https://github.com/KirillKornienko), [@mandrookin](https://github.com/mandrookin), [@ekondur](https://github.com/ekondur), [@Gromozekaster](https://github.com/Gromozekaster),
[@daviddesmet](https://github.com/daviddesmet), [@mjftechnology](https://github.com/mjftechnology), [@jonny-xhl](https://github.com/jonny-xhl), [@radiodeer](https://github.com/radiodeer), [@Des1re7](https://github.com/Des1re7), [@araujofrancisco](https://github.com/araujofrancisco), [@conqu1stador](https://github.com/conqu1stador), [@pietro29](https://github.com/pietro29).
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Documentation
You can read the [FastReport Open Source Documentation](https://fastreports.github.io/FastReport.Documentation/) on the github site or you can read the [documentation for the commercial product](https://www.fast-report.com/public_download/docs/FRNet/online/en/index.html), amending the [functionality limitations](https://opensource.fast-report.com/p/the-feature-comparison-table-for.html).
## License
Licensed under the MIT license. See [LICENSE.md](LICENSE.md) for details. The MIT license does not cover the FastReport Designer Community Edition.
## Resources
- [FastReport Open Source Blog with Articles and How-Tos](https://opensource.fast-report.com/)
- [The Feature Comparison Table for FastReport Open Source, FastReport Core, FastReport .NET](https://opensource.fast-report.com/p/the-feature-comparison-table-for.html "FastReport Open Source vs FastReport Core vs FastReport .NET")
- [FastReport Core Online Demo](https://www.fast-report.com:2018 "Click to view FastReport Online Demo")
- [FastReport Online Designer](https://www.fast-report.com/en/product/fast-report-online-designer/ "Click to view FastReport Online Designer Home Page")
- [Fast Reports Home Page](https://www.fast-report.com "Click for visiting the Fast Reports Home Page")

Binary file not shown.

Binary file not shown.

32
uecko-erp.sln Normal file
View File

@ -0,0 +1,32 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.2.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{07C2787E-EAC7-C090-1BA3-A61EC2A24D84}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fastreport-cli", "fastreport-cli", "{1C34789F-0E1A-CA83-9858-BEAA929278B6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastReportCliGenerator", "tools\fastreport-cli\FastReportCliGenerator.csproj", "{A8ED47CA-7B74-F26D-058D-6D6FD981B253}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A8ED47CA-7B74-F26D-058D-6D6FD981B253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8ED47CA-7B74-F26D-058D-6D6FD981B253}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8ED47CA-7B74-F26D-058D-6D6FD981B253}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8ED47CA-7B74-F26D-058D-6D6FD981B253}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{1C34789F-0E1A-CA83-9858-BEAA929278B6} = {07C2787E-EAC7-C090-1BA3-A61EC2A24D84}
{A8ED47CA-7B74-F26D-058D-6D6FD981B253} = {1C34789F-0E1A-CA83-9858-BEAA929278B6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AF858B63-A8CD-4661-B6E0-451742E4C40E}
EndGlobalSection
EndGlobal