Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2106

Re: Problem in Matrix

$
0
0

Hi Dimitris,

 

Follow this sample:

 

            SAPbouiCOM.DBDataSource oDBDS = null;            SAPbouiCOM.Column oColumn = null;            SAPbouiCOM.Matrix oMatrix = null;            #region addDS            oDBDS = oForm.DataSources.DBDataSources.Add("your table");            #endregion            #region DataBind            oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("id of your matrix").Specific;            //Associate collumn of your matrix with field of your query            oColumn = oMatrix.Columns.Item("#");            oColumn.DataBind.SetBound(true, "your table", "your field");            oColumn = objMatrix.Columns.Item("code");            oColumn.DataBind.SetBound(true, "your table", "your other field");            oColumn = oMatrix.Columns.Item("name");            oColumn.DataBind.SetBound(true, "your table", "your other field");            #endregion            #region Load and Show            //Load your datasource to the object            oDBDS = oForm.DataSources.DBDataSources.Item("your table");            //Create your conditions            SAPbouiCOM.Conditions oConditions = null;            SAPbouiCOM.Condition oCondition = null;            oConditions = (SAPbouiCOM.Conditions)oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_Conditions);            oCondition = oConditions.Add();            oCondition.Alias = "your field that you need filtering";            oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_LESS_THAN; //Your condition            oCondition.CondVal = "condition value";            //run your query in your table with your conditions            oDBDS.Query(oConditions);            //Load the result in your matrix            oMatrix.LoadFromDataSourceEx(true);            #endregion

 

Hope it helps,

 

Regards,

Diego


Viewing all articles
Browse latest Browse all 2106

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>