IPrxReportUserEvents.EventOnAfterAddSheet

Fore Syntax

Sub EventOnAfterAddSheet(Args: IUiPrxSheetEventArgs);
Begin
   
//set of operators;
End Sub EventOnAfterAddSheet;

Fore.NET Syntax

Sub EventOnAfterAddSheet(Args: Prognoz.Platform.Interop.Report.UiPrxSheetEventArgs);
Begin
   
//set of operators;
End Sub EventOnAfterAddSheet;

Parameters

Args. The parameter that enables the user to work with event parameters.

Description

The EventOnAfterAddSheet method implements the event that occurs after adding a sheet.

Comments

To implement the event that occurs after deleting the sheet, use the IPrxReportUserEvents.EventOnAfterDeleteSheet method.

Fore Example

Executing the example requires a regular report. Connect a unit to the regular report, select the connected unit an the EventsClass class as an event handler. Add links to the Metabase, Report, Ui system assemblies in the unit.

Class EventsClass: ReportEvents
Public Sub OnAfterAddSheet(Sheet : IPrxSheet);
Begin
    WinApplication.InformationBox("Sheet is added " + Sheet.Name);
End Sub OnAfterAddSheet;
Public Sub OnAfterDeleteSheet(Sheet : IPrxSheet);
Begin
    WinApplication.InformationBox("Sheet is deleted " + Sheet.Name);
End Sub OnAfterDeleteSheet;
End Class EventsClass;

On adding and deleting the sheet in the regular report an information message is displayed.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Ui;

Public Class EventsClass: PrxForeNetReportUserEventsClass
Public Override Sub OnAfterAddSheet(Sheet : IPrxSheet);
Var
    WinAppCls: WinApplicationClass = New WinApplicationClassClass();
Begin
    WinAppCls.InformationBox("Sheet is added " + Sheet.Name, Null);
End Sub OnAfterAddSheet;
Public Override Sub OnAfterDeleteSheet(Sheet : IPrxSheet);
Var
    WinAppCls: WinApplicationClass = New WinApplicationClassClass();
Begin
    WinAppCls.InformationBox("Sheet is deleted " + Sheet.Name, Null);
End Sub OnAfterDeleteSheet;
End Class EventsClass;

See also:

IPrxReportUserEvents

Related work items

Requirement