Reports Module (Reference) provides comprehensive report generation capabilities including formatted documents, WebData integration, and multi-format output support. The Reports Module enables::
- Text and PDF report generation
- Web API data integration
- Dynamic content with tags
- Multiple output formats
- Scheduled generation
- Real-time monitoring
Module Components
Configuration Sections
| Section | Path | Purpose |
|---|---|---|
| Forms | Reports → Forms | Report templates and formatting |
| WebData | Reports → WebData | API integration and data exchange |
| Forms Editor | Reports → Forms Editor | Visual report design |
| WebData Editor | Reports → WebData Editor | Data structure editing |
| Monitor | Reports → Monitor | Runtime status tracking |
Configuration Workflow
| Step | Action | Location | Purpose |
|---|---|---|---|
| 1 | Create Forms | Reports → Forms | Define report templates |
| 2 | Configure WebData | Reports → WebData | Setup API connections |
| 3 | Design Content | Reports → Forms Editor | Visual report layout |
| 4 | Map Data | Reports → WebData Editor | Configure data bindings |
Runtime Display
Windows WPF Clients
- ReportViewer Control - Native report rendering
- PdfViewer Control - PDF document display
Web HTML5 Clients
- PdfViewer Control - Browser-based PDF viewing
Control Examples
xml
<ReportViewer ReportName="ProductionReport" />
<PdfViewer Source="@Report.Form.DailyReport.SavedFileName" />Report Namespace
Access report objects at runtime:
Common Properties
| Property | Type | Description |
|---|---|---|
@Report.Form.<Name> | ReportItem | Report form object |
@Report.WebData.<Name> | WebDataItem | WebData object |
@Report.Form.<Name>.Append | int | Append mode (0/1) |
@Report.Form.<Name>.Category | string | Report category |
@Report.Form.<Name>.SavedFileName | string | Output file path |
Runtime Methods
csharp
// Generate report
@Report.Form.ProductionReport.Generate();
// Save report
@Report.Form.ProductionReport.Save();
// Execute WebData request
await @Report.WebData.APIData.GetRequestAsync();Report Generation
Manual Trigger
csharp
public void GenerateReport()
{
// Set report data
@Tag.ReportDate = DateTime.Today;
// Generate and save
@Report.Form.DailyReport.Generate();
@Report.Form.DailyReport.Save();
}Scheduled Generation
Using SaveTrigger property:
csharp
// Configure trigger
@Report.Form.ShiftReport.SaveTrigger = "Tag.ShiftEnd";
// Trigger generation
@Tag.ShiftEnd = 1; // Triggers reportOutput Formats
| Format | Extension | Features | Use Case |
|---|---|---|---|
| Full formatting, professional | Distribution | ||
| HTML | .html | Web-ready, hyperlinks | Online viewing |
| Unicode | .txt | International characters | Multi-language |
| ASCII | .txt | Plain text | Data export |
Output Formats by Target Platform
The SaveFormat list of a report form offers the formats its solution saves on every host. HTML and PDF use a Windows rendering component, so the list offers them in Windows target solutions. Multiplatform solutions also run on Linux, so their list offers Text, Unicode and ASCII.
SaveFormat | Windows target | Multiplatform target |
|---|---|---|
Text | Yes | Yes |
Unicode | Yes | Yes |
ASCII | Yes | Yes |
HTML | Yes | No |
Yes | No |
A report form in a Multiplatform solution can still carry HTML, PDF or XPS: an import, a write through the AI Designer, a solution created from a Windows template, an upgraded solution, or a solution moved from Windows to Multiplatform keeps the format it had. The Designer keeps the value and names the report in a warning: in the import or AI write result, in the confirmation when you change the Target Platform to Multiplatform, and as a build warning at the build the solution needs before it runs and at each Rebuild All. The save works when the runtime runs on Windows and fails on Linux or macOS. To save on any host, set SaveFormat to Text, Unicode or ASCII.
WebData Integration
API Configuration
csharp
// Configure endpoint
@Report.WebData.Weather.DefaultURL =
"https://api.weather.com/data";
// Set authentication
@Report.WebData.Weather.Headers["Authorization"] =
"Bearer {{Tag.APIToken}}";Data Exchange
csharp
// GET request
string data = await @Report.WebData.Weather.GetRequestAsync();
// POST request
await @Report.WebData.Weather.PostRequestAsync();Monitoring
Access Reports → Monitor during runtime:
- Generation status
- Error tracking
- File operations
- Server-side only
Monitor properties:
csharp
string status = @Report.Form.MyReport.LastStatus;
string error = @Report.Form.MyReport.LastStatusMessage;Best Practices Checklist
- Test templates - Preview before production
- Validate data - Check tags before generation
- Handle errors - Monitor LastStatus
- Manage storage - Archive old reports
- Schedule wisely - Avoid peak times
- Secure APIs - Protect credentials
- Document reports - Clear descriptions
Troubleshooting
Report not generating:
- Check trigger conditions
- Verify data availability
- Review file permissions
- Monitor error messages
WebData fails:
- Verify API endpoint
- Check authentication
- Review network access
- Validate data format
Format issues:
- Match output to viewer
- Check font availability
- Review margins/spacing
- Test encoding
→ Modules / Business Operations / Reports Module → Tutorials / Business Operations / Reports Module Tutorial → How-to Guides / Business Operations / Reports Module How-to Guide → Technical Reference / Business Operations / Reports Module ReferenceReports Module Links
Explanation - to understand concepts
Tutorials - to learn by doing
How-to Guides - to accomplish specific tasks
Reference - technical details
In this section...