Raised during the printing or previewing to allow clients to customize particular texts displayed in the report.
Namespace: MindFusion.Scheduling.Reporting
Assembly: MindFusion.Scheduling.Wpf.Reporting
C# Copy Code |
---|
public event EventHandler<ReportQueryTextEventArgs> QueryText |
Visual Basic Copy Code |
---|
Public Event QueryText As EventHandler(Of ReportQueryTextEventArgs) |
QueryText event handlers receive an argument of type ReportQueryTextEventArgs.
The QueryText event is raised for individual values displayed in the report. This is very convenient when you need to format some common types, such as DateTime.
The following example demonstrates how to format all DateTime objects in a report with a custom format using the QueryText event:
C# Copy Code |
---|
void OnQueryText(object sender, ReportQueryTextEventArgs e) { if (e.Value is DateTime) e.Representation = ((DateTime)e.Value).ToString("MMM dd, dddd"); } |
Visual Basic Copy Code |
---|
Sub OnQueryText(ByVal sender As Object, ByVal e As ReportQueryTextEventArgs) |