$npx -y skills add DevExpress/agent-skills --skill devexpress-reports-blazorIntegrate DevExpress Report Viewer and Report Designer into Blazor Server, Blazor WebAssembly, and Blazor Web App. Register AddDevExpressServerSideBlazorReportViewer, AddDevExpressBlazorReporting in Program.cs. Configure DxResourceManager.RegisterScripts in App.razor. Components:
| 1 | # DevExpress Blazor Reporting — Viewer & Designer Integration |
| 2 | |
| 3 | Integrates DevExpress report viewing and designing into Blazor applications. Five components across three families cover every Blazor hosting model. |
| 4 | |
| 5 | This skill covers **Blazor UI component integration only**. For creating reports programmatically (bands, controls, data binding, export), use the `devexpress-reports-core` skill. |
| 6 | |
| 7 | > **Skill boundary — hard stop**: This skill does NOT generate `XtraReport` subclasses, band declarations (`DetailBand`, `GroupHeaderBand`), or control code (`XRLabel`, `XRTable`, etc.). If a report class is needed, switch to `devexpress-reports-core` for that part, get the class name or instance, then return here to wire it into the viewer. |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | ## Agent Workflow — Three Required Phases |
| 12 | |
| 13 | **Do not write any code until all three phases are complete.** This ensures you load the correct reference files and generate a single coherent step-by-step plan. |
| 14 | |
| 15 | - **Phase 1** — Search the project and ask clarifying questions for any unknowns |
| 16 | - **Phase 2** — Apply the decision gates to select the exact component and architecture |
| 17 | - **Phase 3** — Load the matching reference files, merge their steps, present the plan, then execute |
| 18 | |
| 19 | --- |
| 20 | |
| 21 | ## Phase 1 — Preflight: Gather Context |
| 22 | |
| 23 | ### Step 1 — Automated Discovery (Do Before Asking Anything) |
| 24 | |
| 25 | Run these searches in the project before asking the developer: |
| 26 | |
| 27 | 1. **Installed packages**: `dotnet list package` → look for `DevExpress.Blazor.Reporting.*` and their versions |
| 28 | 2. **Blazor configuration classification** — follow this 4-step algorithm and record the result before selecting any component: |
| 29 | |
| 30 | **Step A — Solution structure**: Find all `.csproj` files. Is there a `.Client` project (name suffix or a `<ProjectReference>` from a server project pointing to a client project)? |
| 31 | |
| 32 | **Step B — Server `Program.cs`** (look for `AddRazorComponents` call chain): |
| 33 | |
| 34 | | What is found | Preliminary result | |
| 35 | |---|---| |
| 36 | | `AddRazorComponents()` with no `AddInteractiveServerComponents()` or `AddInteractiveWebAssemblyComponents()` | → **Static** | |
| 37 | | `AddInteractiveServerComponents()` only | → **Interactive Server** | |
| 38 | | `AddInteractiveWebAssemblyComponents()` only | → **Interactive WebAssembly (Client + Server)** | |
| 39 | | Both `AddInteractiveServerComponents()` + `AddInteractiveWebAssemblyComponents()` | → Auto candidate; confirm in Step D | |
| 40 | |
| 41 | **Step C — Client `Program.cs`**: presence of `WebAssemblyHostBuilder.CreateDefault(args)` confirms a WASM client project. If this file exists without a server `Program.cs` that calls `MapRazorComponents` → **Interactive WebAssembly Standalone**. |
| 42 | |
| 43 | **Step D — `@rendermode` in `.razor` files** (search `App.razor`, `Routes.razor`, all `@page` components): |
| 44 | |
| 45 | | Directive / parameter | Indicates | |
| 46 | |---|---| |
| 47 | | `@rendermode InteractiveServer` | Interactive Server | |
| 48 | | `@rendermode InteractiveWebAssembly` | Interactive WebAssembly | |
| 49 | | `@rendermode InteractiveAuto` or `new InteractiveAutoRenderMode(...)` | **Interactive Auto** | |
| 50 | | No directives and no `AddInteractive*` in `Program.cs` | Static | |
| 51 | |
| 52 | > **Key rule**: Both `AddInteractiveServerComponents()` + `AddInteractiveWebAssemblyComponents()` in `Program.cs` does **not** alone mean Auto mode. Final classification uses the `@rendermode` directives actually present in components. |
| 53 | |
| 54 | **Final result** — record one of: **Static** | **Interactive Server** | **Interactive WebAssembly Standalone** | **Interactive WebAssembly (Client + Server)** | **Interactive Auto**. If ambiguous, ask the user for the Visual Studio template name or the `dotnet new` command used to create the project. |
| 55 | |
| 56 | 3. **Existing viewer/designer components**: search all `.razor` files for `<DxReportViewer`, `<DxDocumentViewer`, `<DxReportDesigner`, `<DxWasmDocumentViewer`, `<DxWasmReportDesigner` — note component names and file locations |
| 57 | 4. **Report |