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 | |
| ControlPositionX | Decimal | |
| ControlPositionY | Decimal | |
| ControlSizeX | Decimal | |
| ControlSizeY | Decimal | |
| ControlValueFormula | Text[250] | |
| ControlVisibilityFormula | Text[250] |
Procedures
GetActiveLayoutCode() : Code[20]
Summary: Retrieves the active layout code for the current report.
procedure GetActiveLayoutCode(): Code[20]
Returns: The active layout code for the current report.
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"):
GetControlReplacementText(Text) : Boolean
Summary: Reads the control replacement text to the given buffer variable.
procedure GetControlReplacementText(var ControlReplacementText: Text): Boolean
Parameters:
ControlReplacementText: The buffer variable to store the control replacement text.
Returns: True if the control replacement text was successfully retrieved; otherwise, false.
Remarks: This procedure retrieves the control replacement text.
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.
OptimizeReportLayoutEnabled(Integer) : Boolean
Summary: Check to perform optimizer actions for the specified report ID.
procedure OptimizeReportLayoutEnabled(CurrentReportID: Integer): Boolean
Parameters:
CurrentReportID: The ID of the current report.
Returns: True if optimizer actions should be performed; otherwise, false.
Remarks: This procedure checks to perform the optimizer actions for the current report. It also raises an event to allow enabling or disabling optimizing of the current report. By disabling optimizing a report layout, optimizer actions will not be performed, even though they are specified!
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.
AddGeneralOptimizerAction(Integer, Record KVSKBALayoutOptimizerAction) :
Summary: Adds a new action to the temporary optimizer actions table
procedure AddGeneralOptimizerAction(CurrentReportID: Integer; var LayoutOptimizerAction: Record "KVSKBALayoutOptimizerAction"):
Parameters:
CurrentReportID: The ID of the current report.LayoutOptimizerAction: A new layout optimizer action to be added.
Remarks: This procedure is used to add a general optimizer action to the layout optimizer actions table. It creates a new record with the specified report ID, line number and the given parameters from the record. The line number is incremented globally to ensure uniqueness. The record is marked as active.
Events
OnBeforeGetOptimizerActions(Integer, Boolean) :
Summary: Event raised before getting optimizer actions for a report.
[IntegrationEvent(true, false)]
local procedure OnBeforeGetOptimizerActions(ReportID: Integer; var IsHandled: Boolean):
Parameters:
ReportID: The ID of the report for which optimizer actions are being retrieved.IsHandled: Set to true if the event has been handled and the default logic should be skipped.
Remarks: Use this event to implement custom logic for retrieving optimizer actions for a report. Set IsHandled to true to prevent the standard logic from executing.
OnAfterGetOptimizerActions(Integer) :
Summary: Event raised after getting optimizer actions for a report.
[IntegrationEvent(true, false)]
local procedure OnAfterGetOptimizerActions(ReportID: Integer):
Parameters:
ReportID: The ID of the report for which optimizer actions have been retrieved.
Remarks: Use this event to implement custom logic after retrieving optimizer actions for a report.
OnBeforeCheckOptimizeReportLayoutEnabled(Integer, Boolean, Boolean) :
Summary: Event raised before checking if the optimize report layout feature is enabled.
[IntegrationEvent(true, false)]
local procedure OnBeforeCheckOptimizeReportLayoutEnabled(ReportID: Integer; var IsHandled: Boolean; var OptimizeReportLayout: Boolean):
Parameters:
ReportID: The ID of the report being checked.IsHandled: Set to true if the event has been handled and the default logic should be skipped.OptimizeReportLayout: Indicates whether the optimize report layout feature is enabled.
Remarks: Use this event to implement custom logic for checking if the optimize report layout feature is enabled. Set IsHandled to true to prevent the standard logic from executing.