Skip to content

e1em3ntoDX/DxWinFormsReportingApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DxWinFormsReportingApp

A sample DevExpress-powered Windows Forms application demonstrating how an AI coding agent can design and implement DevExpress XtraReports entirely in the Visual Studio Report Designer by using the GitHub Copilot Custom Agents.


What This Repo Demonstrates

Area Description
Agent-driven report authoring Every report is generated from a natural-language spec + a structured implementation plan
Spec → Plan → Code workflow Each report has a human-readable spec and a detailed implementation plan before any code is written

Tech Stack

  • .NET 10 / Windows Forms (net10.0-windows)
  • DevExpress.Win.Reporting 25.2

Project Structure

DxWinFormsReportingApp/
├── .github/agents/
│   └── report-designer.agent.md     # VS Code agent definition for the DevExpress Report Designer Expert
├── Program.cs                       # Entry point
├── ReportViewerForm.cs/.Designer.cs # Host form with DocumentViewer
│
├── report-specs/                    # Plain-English report requirements
│   ├── customer-quote.md
│   ├── employee-directory.md
│   ├── inventory-stock.md
│   ├── invoice.md
│   ├── packing-slip.md
│   ├── payslip.md
│   ├── purchase-order.md
│   ├── sales-order.md
│   ├── sales-performance.md
│   └── statement-of-account.md
│
├── report-plans/                    # Detailed implementation blueprints created by GitHub Copilot 
│   ├── customer-quote-plan.md
│   ├── employee-directory-plan.md
│   ├── inventory-stock-plan.md
│   ├── invoice-plan.md
│   ├── packing-slip-plan.md
│   ├── payslip-plan.md
│   ├── purchase-order-plan.md
│   ├── sales-order-plan.md
│   ├── sales-performance-plan.md
│   └── statement-of-account-plan.md
│
├── Reports/                         # Implemented XtraReport subclasses
│   ├── Report.cs / .Designer.cs              # Base/demo report
│   ├── Invoice.cs / .Designer.cs
│   ├── CustomerQuote.cs / .Designer.cs
│   ├── Payslip.cs / .Designer.cs
│   ├── EmployeeDirectory.cs / .Designer.cs
│   ├── InventoryStock.cs / .Designer.cs
│   ├── PackingSlip.cs / .Designer.cs
│   ├── SalesOrder.cs / .Designer.cs
│   ├── SalesPerformance.cs / .Designer.cs
│   ├── PurchaseOrder.cs / .Designer.cs
│   └── StatementOfAccount.cs / .Designer.cs
│
└── Model/
    └── CountryData.cs

Agent Workflow

Reports in this repo are authored using the following three-step workflow, driven entirely by an AI coding agent:

report-specs/<name>.md          Natural-language requirements authored by a human
        │
        ▼
report-plans/<name>-plan.md     Detailed implementation blueprint:
                                  • Band list with heights
                                  • Control layout and weights
                                  • Expression bindings
                                  • Style definitions
                                  • Field declaration list
        │
        ▼
Reports/<Name>.cs               Partial class — constructor only
Reports/<Name>.Designer.cs      Full InitializeComponent() following DevExpress
                                designer serialization order:
                                  1. Inline local objects (XRSummary, etc.)
                                  2. new() calls for all fields
                                  3. BeginInit() — all at once
                                  4. Property assignments + AddRange()
                                  5. Report-level setup (Bands, Styles, Parameters)
                                  6. EndInit() — in same order as BeginInit()

Agent Definition (.github/agents/report-designer.agent.md)

The repo includes a VS Code agent definition at .github/agents/report-designer.agent.md. It can be invoked directly in Copilot Chat using @report-designer. It enforces:

  • File discipline — layout code only in *.Designer.cs, never in *.cs
  • ExpressionBindings onlyDataBindings.Add() is forbidden
  • XRTable for columns — stacked XRLabel controls for tabular data are forbidden
  • DXFont instead of System.Drawing.Font
  • BeginInit/EndInit pairing — all BeginInit calls before any property assignments, all EndInit at the end
  • Criteria Language — no C# ternary ? :, no double-quoted strings, Iif() / FormatString() / sumSum() / sumCount() patterns
  • No DataSource in InitializeComponent() — assigned at runtime

Building and Running

dotnet build
dotnet run --project DxWinFormsReportingApp

Requires a valid DevExpress license (v25.2). The application opens a ReportViewerForm displaying the default Report. To preview a specific report, change the DocumentSource assignment in ReportViewerForm.cs:

documentViewer1.DocumentSource = new Reports.Invoice();

Data sources are assigned at runtime — the InitializeComponent() methods contain no SqlDataSource wiring.


Adding a New Report

  1. Write a spec in report-specs/<name>.md describing the business requirements.
  2. Ask the agent to create an implementation plan in report-plans/<name>-plan.md.
  3. Ask the agent to implement Reports/<Name>.cs and Reports/<Name>.Designer.cs from the plan.
  4. Run dotnet build to verify zero errors.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages