KVSKBALayoutOptimizerAction#
Fields#
Name | Type | Note |
---|---|---|
ReportID | Integer | |
LineNo | Integer | |
ReportCaption | Text[249] | FlowField |
Active | Boolean | |
ActionType | Enum (KVSKBALayoutOptimizerAction) | |
LayoutSection | Enum (KVSKBALayoutSection) | |
LayoutControlType | Enum (KVSKBALayoutControlType) | |
ControlName | Text[100] | |
NewAttributeValue | Text[100] | |
ControlReplacement | Blob |
Procedures#
GetActiveLayoutCode() : Code[20]#
Summary: Retrieves the active layout code for the current report.
procedure GetActiveLayoutCode(): Code[20]
Remarks: This procedure checks if the report ID is valid and retrieves the active layout code from the "Report Layout Selection" record. If the report metadata indicates that the default layout is RDLC, it returns the custom report layout code. If no custom layout is found, it returns an empty string.
SetControlReplacementFromBlob(Codeunit Temp Blob) :#
procedure SetControlReplacementFromBlob(TempBlob: Codeunit "Temp Blob"):
InitOptimizerActions() :#
Summary: Initializes the optimizer actions for the current report.
procedure InitOptimizerActions():
Remarks: This procedure resets the record if it is temporary and deletes all existing records. It is typically called at the beginning of the report processing to ensure that the optimizer actions are set up correctly. It is used to prepare the layout optimizer actions table for the current report.
GetOptimizerActions(Integer) :#
Summary: Retrieves the optimizer actions for the specified report ID.
procedure GetOptimizerActions(CurrentReportID: Integer):
Parameters:
CurrentReportID
: The ID of the current report.
Remarks: This procedure initializes the optimizer actions for the current report. It checks if the record is temporary and initializes the actions accordingly. It also raises an event to allow for customization before the actions are retrieved. The actions are determined based on the current report ID and may include replacing Tablix controls with hidden rectangles, modifying page dimensions, and other layout optimizations.
AddTablixRemoveAction(Integer, Enum KVSKBALayoutOptimizerAction, Text[100]) :#
Summary: Adds a new action to remove a Tablix control from the report layout.
procedure AddTablixRemoveAction(CurrentReportID: Integer; LayoutAction: Enum "KVSKBALayoutOptimizerAction"; CurrentControlName: Text[100]):
Parameters:
CurrentReportID
: The ID of the current report.LayoutAction
: The type of layout action to perform.CurrentControlName
: The name of the control to be removed.
Remarks: This procedure is used to add a new action to the layout optimizer actions table. It creates a new record with the specified report ID, line number, action type, layout section, control type, and control name. The line number is incremented globally to ensure uniqueness. The record is marked as active.
Events#
OnBeforeGetOptimizerActions(Integer, Boolean) :#
[IntegrationEvent(true, false)]
local procedure OnBeforeGetOptimizerActions(ReportID: Integer; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Table, Table::"KVSKBALayoutOptimizerAction", 'OnBeforeGetOptimizerActions', '', false, false)]
local procedure DoSomethingOnBeforeGetOptimizerActions(ReportID: Integer; var IsHandled: Boolean)
begin
end;