FlexiReport 9.0.1

dotnet add package FlexiReport --version 9.0.1
                    
NuGet\Install-Package FlexiReport -Version 9.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FlexiReport" Version="9.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FlexiReport" Version="9.0.1" />
                    
Directory.Packages.props
<PackageReference Include="FlexiReport" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FlexiReport --version 9.0.1
                    
#r "nuget: FlexiReport, 9.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=FlexiReport&version=9.0.1
                    
Install FlexiReport as a Cake Addin
#tool nuget:?package=FlexiReport&version=9.0.1
                    
Install FlexiReport as a Cake Tool

Flexi Report - Backend Library

This library is designed to support the backend functionalities required by the Flexi Report Angular library.

📌 Features

  • Report Management: Create, edit, and manage reports.
  • Dynamic SQL Queries: Retrieve data from the database with dynamic queries.
  • Database Schema Retrieval: List tables and columns from the database.
  • Flexible and Customizable: Supports dynamic components generated on the UI side.

🚀 Installation

To add this package to your project, run:

dotnet add package FlexiReport

📖 Usage

1️⃣ Retrieve Database Schema

Retrieve all tables and columns from the connected database:

public async Task<List<DatabaseSchemaDto>> GetDatabaseSchemaAsync(DbContext dbContext, CancellationToken cancellationToken = default)

Example Usage:

var schema = await flexiReportService.GetDatabaseSchemaAsync(dbContext);

2️⃣ Execute SQL Query

Only SELECT queries are allowed.

public async Task<Result<object>> ExecuteQueryAsync(QueryRequestDto request, DbContext dbContext, CancellationToken cancellationToken = default)

Example Usage:

var request = new QueryRequestDto("SELECT * FROM Users");
var result = await flexiReportService.ExecuteQueryAsync(request, dbContext);

3️⃣ Report Model

The Report model contains the following properties:

public sealed class Report
{
    public Guid Id { get; set; }
    public string Content { get; set; }
    public DateTime CreatedAt { get; set; }
    public string Endpoint { get; set; }
    public string Name { get; set; }
    public string PageSize { get; set; }
    public string PageOrientation { get; set; }
    public string FontFamily { get; set; }
    public string SqlQuery { get; set; }
    public string BackgroundColor { get; set; }
    public List<RequestElement>? RequestElements { get; set; }
}

4️⃣ API Integration

To integrate with the frontend, use the following API structure:

[HttpPost("execute-query")]
public async Task<IActionResult> ExecuteQuery([FromBody] QueryRequestDto request)
{
    var result = await _flexiReportService.ExecuteQueryAsync(request, _dbContext);
    return result.IsSuccess ? Ok(result.Value) : BadRequest(result.Error);
}

📌 DTO Models

QueryRequestDto

public sealed record QueryRequestDto(
    string SqlQuery);

ReportDto

public sealed record ReportDto(
    Guid? Id,
    string Content,
    string Endpoint,
    string Name,
    string PageSize,
    string PageOrientation,
    string FontFamily,
    string SqlQuery,
    string BackgroundColor,
    List<RequestElementDto> RequestElements);

📜 License

Distributed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.1 482 3/16/2025
9.0.0 132 3/16/2025

Initial release with core features:

- Dynamic SQL query execution
- Database schema retrieval
- Report model with customizable properties
- API integration for frontend communication