Rapid.SmartReport.Blazor
1.0.9
dotnet add package Rapid.SmartReport.Blazor --version 1.0.9
NuGet\Install-Package Rapid.SmartReport.Blazor -Version 1.0.9
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="Rapid.SmartReport.Blazor" Version="1.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rapid.SmartReport.Blazor --version 1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Rapid.SmartReport.Blazor, 1.0.9"
#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.
// Install Rapid.SmartReport.Blazor as a Cake Addin #addin nuget:?package=Rapid.SmartReport.Blazor&version=1.0.9 // Install Rapid.SmartReport.Blazor as a Cake Tool #tool nuget:?package=Rapid.SmartReport.Blazor&version=1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Rapid.SmartReport.Blazor
Blazor components and UI integration for the Rapid.SmartReport library.
Note: This package requires the
Rapid.SmartReport.Core
package to function. Make sure to install both packages when using Blazor.
Installation
# Install both required packages
dotnet add package Rapid.SmartReport.Core # Required base package
dotnet add package Rapid.SmartReport.Blazor # Blazor components
Features
🖥️ Interactive Components
- ReportViewer component for displaying reports
- Interactive table components with sorting and filtering
- Dynamic chart components
- Custom report controls
🎨 Real-time Preview
- Live preview of report changes
- Interactive parameter controls
- Dynamic template switching
- Real-time style customization
🔧 Easy Integration
- Simple component-based API
- Built-in themes
- Customizable templates
- Event handling for user interactions
Usage Examples
Basic Report Viewer
@page "/report-viewer"
@using Rapid.SmartReport.Blazor
<ReportViewer Report="@report" />
@code {
private Report<SalesData> report;
protected override void OnInitialized()
{
report = Report<SalesData>.Create()
.WithTitle("Sales Report")
.WithData(salesData);
}
}
Interactive Table
<ReportTable Data="@salesData"
TItem="SalesData"
PageSize="10"
Sortable="true"
Filterable="true">
<Columns>
<Column Property="@(x => x.Date)" Title="Date" Format="d" />
<Column Property="@(x => x.Product)" Title="Product" />
<Column Property="@(x => x.Amount)" Title="Amount" Format="C2" />
</Columns>
</ReportTable>
Dynamic Chart
<ReportChart Data="@salesData"
Type="ChartType.Bar"
Title="Monthly Sales"
Labels="@(x => x.Month)"
Values="@(x => x.Revenue)" />
Custom Report Template
<ReportViewer>
<ReportTemplate>
<div class="report-header">
<h1>@Report.Title</h1>
<p>Generated: @DateTime.Now</p>
</div>
<ReportTable Data="@Report.Data" />
<ReportChart Data="@Report.Data"
Type="ChartType.Line" />
<div class="report-footer">
<p>Page @Report.CurrentPage of @Report.TotalPages</p>
</div>
</ReportTemplate>
</ReportViewer>
Component Properties
ReportViewer
Report
: The report instance to displayTheme
: Optional theme customizationShowToolbar
: Toggle toolbar visibilityOnExport
: Event callback for export actions
ReportTable
Data
: The data source for the tablePageSize
: Number of items per pageSortable
: Enable column sortingFilterable
: Enable column filteringOnPageChange
: Page change callbackOnSort
: Sort callbackOnFilter
: Filter callback
ReportChart
Data
: The data source for the chartType
: Chart type (Bar, Line, Pie, etc.)Labels
: Expression for data labelsValues
: Expression for data valuesTitle
: Chart titleOptions
: Additional chart options
Customization
Themes
<ReportViewer Theme="@(new ReportTheme
{
Primary = "#007bff",
Secondary = "#6c757d",
FontFamily = "Roboto, sans-serif"
})" />
Custom Styles
/* custom-report-styles.css */
.report-viewer {
--report-primary-color: #007bff;
--report-font-family: 'Roboto', sans-serif;
}
Events and Interactivity
<ReportViewer
OnExport="HandleExport"
OnPageChange="HandlePageChange"
OnParameterChange="HandleParameterChange">
</ReportViewer>
@code {
private async Task HandleExport(ExportEventArgs args)
{
// Handle export action
}
private void HandlePageChange(int newPage)
{
// Handle page change
}
private async Task HandleParameterChange(ParameterChangeEventArgs args)
{
// Handle parameter changes
}
}
Best Practices
Performance
- Use virtualization for large datasets
- Enable lazy loading when appropriate
- Implement proper data pagination
Responsiveness
- Use responsive layouts
- Test on different screen sizes
- Implement mobile-friendly controls
Error Handling
- Implement proper error boundaries
- Provide user-friendly error messages
- Handle network issues gracefully
Accessibility
- Follow WCAG guidelines
- Implement proper ARIA attributes
- Ensure keyboard navigation
Contributing
We welcome contributions! Please see the main project's contributing guidelines.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- EPPlus (>= 7.5.2)
- Microsoft.AspNetCore.Components.Web (>= 9.0.0)
- Rapid.SmartReport.Core (>= 1.0.9)
- System.Linq.Dynamic.Core (>= 1.5.1)
- System.Text.Json (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.