Skip to Content
Author's profile photo Former Member

Set Default Layout DI API

    Public Sub setDefaultLayout(_LayoutCode As String, _ReportCode As String, _UserID As Integer)

        Dim oCmpSrv As SAPbobsCOM.CompanyService

        Dim oReportLayoutService As ReportLayoutsService

        Dim oDefaultReportParams As DefaultReportParams

        ‘Get report layout service

        oCmpSrv = B1Connections.diCompany.GetCompanyService

        oReportLayoutService = oCmpSrv.GetBusinessService(ServiceTypes.ReportLayoutsService)

        ‘Set parameters

        oDefaultReportParams = oReportLayoutService.GetDataInterface(ReportLayoutsServiceDataInterfaces.rlsdiDefaultReportParams)

        oDefaultReportParams.LayoutCode = _LayoutCode

        oDefaultReportParams.ReportCode = _ReportCode

        oDefaultReportParams.UserID = _UserID

        ‘Set the report as default


    End Sub

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.