Skip to Content
0
Former Member
Jul 10, 2014 at 03:50 PM

Matrix Not Loading

13 Views

Hello All,

please am loading my matrix with the below code but is not loading although i have data in the table filling the matrix.

oForm.DataSources.DBDataSources.Add("@PSPRRECURRINGTRANS")

oForm.DataSources.UserDataSources.Add("Number", BoDataType.dt_SHORT_NUMBER, 5)

oForm.DataSources.UserDataSources.Add("EmpName", BoDataType.dt_LONG_TEXT, 50)

oMatrix = oForm.Items.Item("matTrans").Specific

oColumns = oMatrix.Columns

oColumnUDS = oColumns.Item("Num")

oColumnUDS.DataBind.SetBound(True, "", "Number")

oColumnUDS = oColumns.Item("empname")

oColumnUDS.DataBind.SetBound(True, "", "EmpName")

oColumns = oMatrix.Columns

oColumnDBS = oColumns.Item("empid")

oColumnDBS.DataBind.SetBound(True, "@PSPRRECURRINGTRANS", "U_iEmployeeID")

oColumns = oMatrix.Columns

oColumnDBS = oColumns.Item("expiredate")

oColumnDBS.DataBind.SetBound(True, "@PSPRRECURRINGTRANS", "U_dExpDate")

oColumns = oMatrix.Columns

oColumnDBS = oColumns.Item("unit")

oColumnDBS.DataBind.SetBound(True, "@PSPRRECURRINGTRANS", "U_nUnit")

oColumns = oMatrix.Columns

oColumnDBS = oColumns.Item("amount")

oColumnDBS.DataBind.SetBound(True, "@PSPRRECURRINGTRANS", "U_curAmount")

oColumns = oMatrix.Columns

oColumnDBS = oColumns.Item("transtype")

oColumnDBS.DataBind.SetBound(True, "@PSPRRECURRINGTRANS", "U_szTransType")

oColumns = oMatrix.Columns

oColumnDBS = oColumns.Item("transcode")

oColumnDBS.DataBind.SetBound(True, "@PSPRRECURRINGTRANS", "U_iTransCode")

oMatrix.Columns.Item("transtype").Visible = False

oMatrix.Columns.Item("transcode").Visible = False

oMatrix.Clear()

oMatrix.LoadFromDataSource()

such suggestions if am not doing it right

thanks