on 08-01-2008 11:18 AM
Hi,
when i'm using the drag and relate functionality no matching records are found (Cardcode --> Quotations).
Could it be that this feature is not supported by user forms ?
regards
Markus
Hi Markus,
Even if you have connected your field into a DBDatasource, the drag and relate is working. Otherwise
(linked button with given linkedobjecttype) also unfortunatelly not working. (how the system know the
input for the Drag and Relate)?
Hereby I am attached a samle code
Sub CreateForm_ForDragAndRelate()
Dim oForm As SAPbouiCOM.Form = sbo_application.Forms.Add("TEST_DD")
oForm.Visible = True
Dim oitem As SAPbouiCOM.Item = oForm.Items.Add("1", BoFormItemTypes.it_BUTTON)
With oitem
.Top = oForm.Height - 60
.Left = 5
.Width = 80
End With
oitem = oForm.Items.Add("2", BoFormItemTypes.it_BUTTON)
With oitem
.Top = oForm.Height - 60
.Left = 5 + 80 + 1
.Width = 80
End With
oitem = oForm.Items.Add("MTX", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
With oitem
.Top = 5
.Left = 5
.Width = oForm.Width - 15
.Height = oForm.Height - 15
.AffectsFormMode = False
End With
'
Dim oMatrix As SAPbouiCOM.Matrix = oitem.Specific
Dim oColumns As SAPbouiCOM.Columns = oMatrix.Columns
Dim oDBDataSource As DBDataSource = oForm.DataSources.DBDataSources.Add("OCRD")
Dim oColumn As SAPbouiCOM.Column = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
With oColumn
.TitleObject.Caption = "#"
.Description = .TitleObject.Caption
.Width = 30
'.DataBind.SetBound(True, "OCRD", "CARDCODE")
.Editable = False
End With
oColumn = oColumns.Add("COL1", SAPbouiCOM.BoFormItemTypes.it_EDIT)
With oColumn
.Width = 80
.TitleObject.Caption = "CardName"
.Description = .TitleObject.Caption
.Editable = False
.DataBind.SetBound(True, "OCRD", "CARDCODE")
.DisplayDesc = True
.Visible = True
End With
oColumn = oColumns.Add("COL2", SAPbouiCOM.BoFormItemTypes.it_EDIT)
With oColumn
.Width = 80
.TitleObject.Caption = "CardName"
.Description = .TitleObject.Caption
.Editable = False
.DataBind.SetBound(True, "OCRD", "CARDNAME")
.DisplayDesc = True
.Visible = True
End With
oColumn = oColumns.Add("COL3", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
With oColumn
.Width = 80
.TitleObject.Caption = "TYPE"
.Description = .TitleObject.Caption
.Editable = False
.DataBind.SetBound(True, "OCRD", "CARDTYPE")
.DisplayDesc = True
.Visible = True
End With
oColumn = oColumns.Add("COL4", SAPbouiCOM.BoFormItemTypes.it_EDIT)
With oColumn
.Width = 80
.TitleObject.Caption = "BALANCE"
.Description = .TitleObject.Caption
.Editable = False
.DataBind.SetBound(True, "OCRD", "Balance")
.DisplayDesc = True
.Visible = True
End With
oDBDataSource.Query()
oMatrix.LoadFromDataSource()
End Sub
Regards,
Janos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.