ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Win Assembly / GrapeCity.ActiveReports.Viewer.Win Namespace / Viewer Class / RefreshReport Event
Example

In This Topic
    RefreshReport Event (Viewer)
    In This Topic
    Occurs before the report refreshes. This event is triggered in several scenarios, including: - Opening a new report. - Performing actions such as toggling, sorting, or executing drill-through actions within the report. - Interacting with the UI to view the report (e.g., using the parameters panel), toggling galley mode, refreshing the report, or navigating back to a parent report in a drill-through scenario. In the absence of any errors, this event precedes the LoadCompleted event.
    Syntax
    'Declaration
     
    Public Event RefreshReport As EventHandler
    public event EventHandler RefreshReport
    Remarks
    This event provides an opportunity to perform custom actions or modifications before the report is refreshed. Subscribing to this event can be particularly useful in scenarios where you need to maintain a consistent state across report refreshes or when you need to prepare the application for the changes that a new or refreshed report might bring.
    Example
    // Assuming 'viewer' is your Viewer control instance
    viewer.RefreshReport += Viewer_RefreshReport;
    private void Viewer_RefreshReport(object sender, EventArgs e)
    {
        // Custom logic upon report refresh
        // For example, enable a 'Save' button only after the report has been refreshed
        saveReportButton.Enabled = true;
    }
    See Also