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.
| 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 |
- .NET 10 / Windows Forms (
net10.0-windows) - DevExpress.Win.Reporting 25.2
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
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()
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 ExpressionBindingsonly —DataBindings.Add()is forbiddenXRTablefor columns — stackedXRLabelcontrols for tabular data are forbiddenDXFontinstead ofSystem.Drawing.FontBeginInit/EndInitpairing — allBeginInitcalls before any property assignments, allEndInitat the end- Criteria Language — no C# ternary
? :, no double-quoted strings,Iif()/FormatString()/sumSum()/sumCount()patterns - No
DataSourceinInitializeComponent()— assigned at runtime
dotnet build
dotnet run --project DxWinFormsReportingAppRequires 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.
- Write a spec in
report-specs/<name>.mddescribing the business requirements. - Ask the agent to create an implementation plan in
report-plans/<name>-plan.md. - Ask the agent to implement
Reports/<Name>.csandReports/<Name>.Designer.csfrom the plan. - Run
dotnet buildto verify zero errors.