on 03-29-2006 10:57 AM
I have one projecto with matrix seemed with the example demonstrated in C:\Program Files\SAP Manage\SAP Business One SDK\Samples\COM UI\VB.NET\06.MatrixAndDataSources\2003. I created a table, @PTSFCT, in SAP Business One.
I can bind to the table oDBDataSource = oForm.DataSources.DBDataSources.Add("@PTSFCT") and place all the values in matrix.
However, I would like to only select some data of the table using a Query.
For example: I would like to only show the registers of the table whose Num_Contrat is 1. How I must you make it?
Hi Danilton,
You can approach this is one of two methods. You can either use a condition on your db data source (Look at conditions in the help file) or you can use a datatable and use a grid with that instead of a matrix. You can design the form in screenpainter. See below the code example.
Dim oTable As SAPbouiCOM.DataTable
Dim oGrid As SAPbouiCOM.Grid
oGrid = oForm.Items.Item("m_BP").Specific
oTable = oForm.DataSources.DataTables.Item(sTable)
oGrid.DataTable = oTable
oTable.ExecuteQuery(sQuery)
Hope it helps,
Adele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
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.