Codeunit 18122007 EOS Advanced Reporting Mngt
Codeunit 18122007 EOS Advanced Reporting Mngt
Methods
PrepareBuffer
procedure PrepareBuffer(DocVariant: Variant; SetupCode: Code[10]; var RBHeader: Record "EOS Report Buffer Header" temporary; var RBLine: Record "EOS Report Buffer Line" temporary)
Parameters / Return Value
DocVariant
Variant
SetupCode
Code[10]
RBHeader
Record "EOS Report Buffer Header"
RBLine
Record "EOS Report Buffer Line"
PrepareBuffer
procedure PrepareBuffer(DocVariant: Variant; SetupCode: Code[10]; var RBHeader: Record "EOS Report Buffer Header" temporary; var RBLine: Record "EOS Report Buffer Line" temporary; ReportName: Text)
Parameters / Return Value
DocVariant
Variant
SetupCode
Code[10]
RBHeader
Record "EOS Report Buffer Header"
RBLine
Record "EOS Report Buffer Line"
ReportName
Text[]
PrepareBuffer
procedure PrepareBuffer(DocVariant: Variant; SetupCode: Code[10];var RBHeader: Record "EOS Report Buffer Header" temporary;var RBLine: Record "EOS Report Buffer Line" temporary;ReportName: Text; LanguageId: integer)
This is the main reporting routine. Generates the buffer, header and lines, of a single document at a time.
Parameters / Return Value
DocVariant
Variant
Source header document.
SetupCode
Code[10]
if blank the default setup report will be searched and lastly the default one in the general setup.
RBHeader
Record "EOS Report Buffer Header"
Generated Buffer Header
RBLine
Record "EOS Report Buffer Line"
Generated Buffer Lines
ReportName
Text[]
Report Name invoking this buffer generation
LanguageId
integer
Force buffer generation language instead of source document language.
GetReportLanguageCode
procedure GetReportLanguageCode(DocVariant: Variant; ReportName: Text): Code[10]
Parameters / Return Value
DocVariant
Variant
ReportName
Text[]
Returns
Code[10]
GetReportLanguageCode
procedure GetReportLanguageCode(DocVariant: Variant; ReportName: Text; ReportSetupCode: code[10]): Code[10]
Parameters / Return Value
DocVariant
Variant
ReportName
Text[]
ReportSetupCode
code[10]
Returns
Code[10]
GetReportLanguageID
procedure GetReportLanguageID(DocVariant: Variant; ReportName: Text): Integer
Parameters / Return Value
DocVariant
Variant
ReportName
Text[]
Returns
Integer
GetReportLanguageID
procedure GetReportLanguageID(DocVariant: Variant; ReportName: Text; ReportSetupCode: code[10]): Integer
Parameters / Return Value
DocVariant
Variant
ReportName
Text[]
ReportSetupCode
code[10]
Returns
Integer
CreateSystemReportSetup
procedure CreateSystemReportSetup(): Code[10]
Parameters / Return Value
- Returns
Code[10]
GetDefaultReportFileName
procedure GetDefaultReportFileName(DocumentRecRef: RecordRef; LanguageCode: Code[10]): Text
Parameters / Return Value
DocumentRecRef
RecordRef
LanguageCode
Code[10]
Returns
Text[]
TryDecodeReportName
procedure TryDecodeReportName(ReportName: Text; var ReportID: Integer)
Parameters / Return Value
ReportName
Text[]
ReportID
Integer
Events
OnBeforeHeaderParsing
local procedure OnBeforeHeaderParsing(HeaderRecRef: RecordRef;var ReportHeader: Record "EOS Report Buffer Header";var Handled: Boolean)
This event is raised before the default header parsing (transferfields). You can replace the default parsing to support tables that are too different from the buffer header.
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
ReportHeader
Record "EOS Report Buffer Header"
Current report header buffer
Handled
Boolean
Returning “true” default engine transferfields will be skipped.
OnAfterHeaderParsing
local procedure OnAfterHeaderParsing(HeaderRecRef: RecordRef;var ReportHeader: Record "EOS Report Buffer Header")
This event is raised after the default/custom header parsing.
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
ReportHeader
Record "EOS Report Buffer Header"
Current report header buffer
OnApplyFiltersToDocumentLine
local procedure OnApplyFiltersToDocumentLine(HeaderRecRef: RecordRef;var ReportHeader: Record "EOS Report Buffer Header";var Lines: RecordRef;var Handled: Boolean)
We must sort/filters all lines according to the header, but we don’t know the header/lines relationship so we ask to subscribers to do it for us
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
ReportHeader
Record "EOS Report Buffer Header"
Current report header buffer
Lines
RecordRef
Current report line buffer
Handled
Boolean
If after the execution of all the Handled subscribers is false an error is raised.
OnBeforeLinesProcessing
local procedure OnBeforeLinesProcessing(HeaderRecRef: RecordRef;var RBHeader: Record "EOS Report Buffer Header";var RBLine: Record "EOS Report Buffer Line")
This event is raised before parsing source document line fields to report buffer line and before all section layout processing. You can use this event to add “header” comments at the beginning of document body.
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
RBHeader
Record "EOS Report Buffer Header"
Current report header buffer
RBLine
Record "EOS Report Buffer Line"
Current report line buffer
OnBeforeLineParsing
local procedure OnBeforeLineParsing(HeaderRecRef: RecordRef;CurrentLineRecRef: RecordRef;var RBHeader: Record "EOS Report Buffer Header";var RBLine: Record "EOS Report Buffer Line";var SkipLine: Boolean;var Handled: Boolean)
This event is raised before parsing source document line fields to report buffer line. You can replace the default parsing to support tables that are too different from the buffer line.
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
CurrentLineRecRef
RecordRef
Source document line reference
RBHeader
Record "EOS Report Buffer Header"
Current report header buffer
RBLine
Record "EOS Report Buffer Line"
Current report line buffer
SkipLine
Boolean
Skip current line avoiding all processing. this line will not be present in the final buffer.
Handled
Boolean
Returning “true” default engine transferfields will be skipped.
OnAfterLineParsing
local procedure OnAfterLineParsing(HeaderRecRef: RecordRef;CurrentLineRecRef: RecordRef;var RBHeader: Record "EOS Report Buffer Header";var RBLine: Record "EOS Report Buffer Line")
This event is raised after moving all fields from the original document line to the line buffer but before all section layout processing
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
CurrentLineRecRef
RecordRef
Source document line reference
RBHeader
Record "EOS Report Buffer Header"
Current report header buffer
RBLine
Record "EOS Report Buffer Line"
Current report line buffer
OnAfterLinesProcessing
local procedure OnAfterLinesProcessing(HeaderRecRef: RecordRef;var RBHeader: Record "EOS Report Buffer Header";var RBLine: Record "EOS Report Buffer Line")
This event is raised after all lines has been added to the current document buffer It’s Useful for adding “footer comment lines”
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
RBHeader
Record "EOS Report Buffer Header"
Current report header buffer
RBLine
Record "EOS Report Buffer Line"
Current report line buffer
OnAfterDocumentProcessing
local procedure OnAfterDocumentProcessing(HeaderRecRef: RecordRef;var RBHeader: Record "EOS Report Buffer Header";var RBLine: Record "EOS Report Buffer Line")
This event is raised at the end af all report buffer processing
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
RBHeader
Record "EOS Report Buffer Header"
Current report header buffer
RBLine
Record "EOS Report Buffer Line"
Current report line buffer
OnCalculateShipmentInfo
local procedure OnCalculateShipmentInfo(HeaderRecRef: RecordRef;var RBHeader: Record "EOS Report Buffer Header";var RBLine: Record "EOS Report Buffer Line";var Handled: Boolean)
This event is raised when che ADR module needs to calculate all shipping info like weights, volumes etc
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
RBHeader
Record "EOS Report Buffer Header"
Current report header buffer
RBLine
Record "EOS Report Buffer Line"
Current report line buffer
Handled
Boolean
OnGetDefaultReportFileName
local procedure OnGetDefaultReportFileName(DocumentRecRef: RecordRef; LanguageCode: Code[10]; var Filename: Text)
This event allows file name customization instead of a automatic filename generation (default)
Parameters / Return Value
DocumentRecRef
RecordRef
Current Document
LanguageCode
Code[10]
Filename
Text[]
Resulting filename. If this event var parameter is empty an automatic filename is generated
OnHeaderCustomFields
local procedure OnHeaderCustomFields(HeaderRecRef: RecordRef;var RBHeader: Record "EOS Report Buffer Header";var TempAdvRptCustomFields: Record "EOS AdvRpt Custom Fields")
This event allows you to add custom values on the document header, then retrieved from the report in the dataset
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
RBHeader
Record "EOS Report Buffer Header"
Current report header buffer
TempAdvRptCustomFields
Record "EOS AdvRpt Custom Fields"
Temporary list of fields-values
OnLineCustomFields
local procedure OnLineCustomFields(HeaderRecRef: RecordRef;CurrentLineRecRef: RecordRef;var RBHeader: Record "EOS Report Buffer Header";var RBLine: Record "EOS Report Buffer Line";var TempAdvRptCustomFields: Record "EOS AdvRpt Custom Fields")
this event allows you to add custom values on every document line, then retrieved from the report in the dataset
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
CurrentLineRecRef
RecordRef
Source document line reference
RBHeader
Record "EOS Report Buffer Header"
Current report header buffer
RBLine
Record "EOS Report Buffer Line"
Current report line buffer
TempAdvRptCustomFields
Record "EOS AdvRpt Custom Fields"
Temporary list of fields-values
OnGetReportLanguageID2
local procedure OnGetReportLanguageID2(HeaderRecRef: RecordRef;ReportID: Integer;var LanguageCode: Code[10];var Handled: Boolean;ReportSetupCode: code[10])
The module determines the printing language by searching for the first field in tablerelation with the Language table. With this event you can change this behavior by providing the custom language code.
Parameters / Return Value
HeaderRecRef
RecordRef
Source document reference
ReportID
Integer
LanguageCode
Code[10]
Return customized Language Code
Handled
Boolean
Return true to skip standard language processing
ReportSetupCode
code[10]
The Report Setup Code
OnBeforePopulateHeaderCustomFields
local procedure OnBeforePopulateHeaderCustomFields(var RBHeader: Record "EOS Report Buffer Header"; var TempAdvRptCustomFields: Record "EOS AdvRpt Custom Fields")
This event is raised before populating CustomFieldLabel1 and CustomFieldValue1
Parameters / Return Value
RBHeader
Record "EOS Report Buffer Header"
Current report header buffer
TempAdvRptCustomFields
Record "EOS AdvRpt Custom Fields"
Temporary list of fields-values
OnAfterPopulateHeaderCustomFields
local procedure OnAfterPopulateHeaderCustomFields(var RBHeader: Record "EOS Report Buffer Header"; var TempAdvRptCustomFields: Record "EOS AdvRpt Custom Fields")
This event is raised after populating CustomFieldLabel1 and CustomFieldValue1
Parameters / Return Value
RBHeader
Record "EOS Report Buffer Header"
Current report header buffer
TempAdvRptCustomFields
Record "EOS AdvRpt Custom Fields"
Temporary list of fields-values
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.