📚 SAP Business One SDK Help

GetReportLayout Method
See Also  Example
pIReportLayoutParams

The key of the report layout to retrieve.

Description

Retrieves a report layout.

Syntax

Visual Basic
Public Function GetReportLayout( _
   ByVal pIReportLayoutParams As ReportLayoutParams _
) As ReportLayout

Parameters

pIReportLayoutParams

The key of the report layout to retrieve.

Return Type

The report layout with the specified key.

Example

Getting a report layout (Visual Basic)Copy Code
Dim oCmpSrv As SAPbobsCOM.CompanyService
Dim oReportLayoutService As ReportLayoutsService
Dim oReportLayoutParam As ReportLayoutParams
Dim oReportLayout As ReportLayout

'Get report layout service
oCmpSrv = oCompany.GetCompanyService
oReportLayoutService = oCmpSrv.GetBusinessService(ServiceTypes.ReportLayoutsService)

'Set parameters
oReportLayoutParam = oReportLayoutService.GetDataInterface(ReportLayoutsServiceDataInterfaces.rlsdiReportLayoutParams)
oReportLayoutParam.LayoutCode = "POR20002"

'Get the report layout
oReportLayout = oReportLayoutService.GetReportLayout(oReportLayoutParam)

'Print the report layout name
Debug.WriteLine(oReportLayout.Name)

See Also