Matrix in combox ?

i want to retrive  data from  table matrix in coloum combo (dd no) . but value not coming
my code
Private Sub DrawRAKELDForm(ByVal oForm As SAPbouiCOM.Form)
        '// Adding a Matrix item
        oItem = oForm.Items.Add("Matrix2", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
        oItem.Left = 5
        oItem.Width = 500    ' 350
        oItem.Top = 154
        oItem.Height = 100
        oItem.FromPane = 2
        oItem.ToPane = 2
        oMatrix = oItem.Specific
        oColumns = oMatrix.Columns
        '// Adding Column items to the matrix2
        oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "#"
        oColumn.Width = 50
        oColumn.Editable = False
        '// Add a column for DD no.
        oColumn = oColumns.Add("DDno", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
        oColumn.TitleObject.Caption = "DD No."
        oColumn.Width = 80
        oColumn.Editable = True
         want  to select       card code in  DD no
      '''''''''''''''''''''''''''''''      may be here some  error     ''''''''''''''''''''''''''''
        'colItemCode = oColumns.Items.item("Matrix1").Cells.Item("ddno").Specific
        ' AddLogCodeCombo(oForm, colItemCode)  ''''''   errror   
   '''''''''''''''''''''''''''''''''''''''''''''''''     errror           ''''''''''''''''''''''''''''''''''''''
        oColumn.DataBind.SetBound(True, "@RAKELD1", "U_draftno")
              '// Add a column for DD Date
        oColumn = oColumns.Add("DDdt", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "Draft Date"
        oColumn.Width = 80
        oColumn.Editable = True
        oColumn.DataBind.SetBound(True, "@RAKELD1", "U_draftdt")
        '// Add a column for Invoice No.
        oColumn = oColumns.Add("Drafamt", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "Amount"
        oColumn.Width = 80
        oColumn.Editable = True
        oColumn.DataBind.SetBound(True, "@RAKELD1", "U_draftamt")
        oColumn = oColumns.Add("bankname", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "Bank Name"
        oColumn.Width = 80
        oColumn.Editable = True
        oColumn.DataBind.SetBound(True, "@RAKELD1", "U_banknm")
        '// Adding "Total Amount" Button
        oItem = oForm.Items.Add("btnamnt", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
        oItem.Left = 216
        oItem.Width = 75
        oItem.Top = 240
        'oItem.Height = 20
        oItem.FromPane = 2
        oItem.ToPane = 2
        oButton = oItem.Specific
        'oButton.Caption = "0.00"
        'oEdittext.DataBind.SetBound(True, "", "FolderDS")
        '// Adding "Add Row" button
        oItem = oForm.Items.Add("btnrow", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
        oItem.Left = 470
        oItem.Width = 65
        oItem.Top = 220
        oItem.Height = 20
        oItem.FromPane = 2
        oItem.ToPane = 2
        oButton = oItem.Specific
        oButton.Caption = "Add Row"
        ''No. of Escorts Edit Box
        ''SuperVisor Edit Box
        oItem = oForm.Items.Add("SupVal", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oItem.Left = 110
        oItem.Width = 160
        oItem.Top = 265 '300
        oItem.AffectsFormMode = True
        oItem.LinkTo = "SupTxt"
        oEdittext = oItem.Specific
        oEdittext.DataBind.SetBound(True, "@ORAKELD", "U_suprvsr")
        ''Remarks Edit Box
        oItem = oForm.Items.Add("RmkVal", SAPbouiCOM.BoFormItemTypes.it_EXTEDIT)
        oItem.Left = 110
        oItem.Width = 160
        oItem.Top = 285 '320
        oItem.AffectsFormMode = True
        oItem.LinkTo = "RmksTxt"
        oEdittext = oItem.Specific
        oEdittext.DataBind.SetBound(True, "@ORAKELD", "U_remark")
        ''Name of Security Firm Edit Box
        oItem = oForm.Items.Add("EnoVal", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oItem.Left = 376 '430
        oItem.Width = 160 '105
        oItem.Top = 265
        oItem.AffectsFormMode = True
        oItem.LinkTo = "EscnoTxt"
        oEdittext = oItem.Specific
        oEdittext.DataBind.SetBound(True, "@ORAKELD", "U_escort")
        oItem = oForm.Items.Add("FmnmVal", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oItem.Left = 376 '430
        oItem.Width = 160 '105
        oItem.Top = 285
        oItem.AffectsFormMode = True
        oItem.LinkTo = "FirmnmTxt"
        oEdittext = oItem.Specific
        oEdittext.DataBind.SetBound(True, "@ORAKELD", "U_firmnm")
        '// Adding a OK button
        oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
        oItem.Left = 5
        oItem.Width = 65
        oItem.Top = 355
        oItem.Height = 20
        oButton = oItem.Specific
        '// Adding a Cancel button
        oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
        oItem.Left = 75
        oItem.Width = 65
        oItem.Top = 355
        oItem.Height = 20
        oButton = oItem.Specific
        oForm.DataBrowser.BrowseBy = "ChlnVal"
    End Sub
Private Sub AddLogCodeCombo(ByVal oform As SAPbouiCOM.Form, ByVal oCombo As SAPbouiCOM.ComboBox)
        Dim RS As SAPbobsCOM.Recordset
        Dim sSQL As String
        ' Dim oCombo As SAPbouiCOM.ComboBox
        'oCombo = oForm.Items.Item("ddno").Specific
        'oCombo = oColumns.Items.item("Matrix1").Cells.Item("ddno").Specific
        While oCombo.ValidValues.Count > 0
            oCombo.ValidValues.Remove(0, SAPbouiCOM.BoSearchKey.psk_Index)
        End While
        RS = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
        sSQL = "SELECT CardCode,CardName FROM OCRD"
        RS.DoQuery(sSQL)
        RS.MoveFirst()
        While RS.EoF = False
            oCombo.ValidValues.Add(RS.Fields.Item("CardCode").Value, RS.Fields.Item("CardName").Value)
            RS.MoveNext()
        End While
    End Sub
please help me...?
Edited by: Animesh Sinha on Sep 15, 2008 1:20 PM
Edited by: Animesh Sinha on Sep 15, 2008 1:24 PM
Edited by: Animesh Sinha on Sep 15, 2008 1:26 PM

Hi Animesh,
You must to bind your column with field in your database.
So your code can be :
'// Add a column for DD no.
oColumn = oColumns.Add("DDno", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
oColumn.TitleObject.Caption = "DD No."
oColumn.Width = 80
oColumn.Editable = True
oColumn.Databind.Bind("Your table", "Your field")
colItemCode = oColumns.Items.item("Matrix1").Cells.Item("ddno").Specific
AddLogCodeCombo(oForm, colItemCode)
Hope i help you.
Regards
Michael

Similar Messages

  • I want to select value in combox  based on another combox in matrix

    Please answer frequently

    Hi
    You van use the follwing code.
      Case BoEventTypes.et_COMBO_SELECT
                                If pVal.ItemUID = "Matrix" And pVal.ColUID = "Combo" Then
                                    Dim oCombo, oCombo1 As SAPbouiCOM.ComboBox
                                    Dim oMatrix As SAPbouiCOM.Matrix
                                    oMatrix = Me.m_SBO_Form.Items.Item("Matrix").Specific
                                    oCombo = oMatrix.Columns.Item("Combo").Cells.Item(pVal.Row).Specific
                                    oCombo1 = oMatrix.Columns.Item("Combo1").Cells.Item(pVal.Row).Specific
                                    If oCombo.Selected.Value = "Value" Then
                                        oCombo1.Select("Value1", BoSearchKey.psk_ByValue)
                                    End If
                                End If
    Regards
    Rupinder

  • Combo inside matrix, help me

    Dear all,
    In my application i have combox in matrix, Values of combo i added (1, 2,3,4...). now when user click button in form it will assign for combobox is 1 or 2 .....  I try this code but error"
    oComboBox = oMatrix.Columns.Item(colName.ToString).Cells.Item(i + 1).Specific()
    oComboBox.Select(1, SAPbouiCOM.BoSearchKey.psk_ByValue)
    Please help me. THanks

    What is the error message?
    Im using it as
    For q = 1 To Matrix.RowCount
                            com = Matrix.Columns.Item("c1").Cells.Item(q).Specific
                            com.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)
      Next q
    and its working.

  • Xml matrix report not expending horizontally

    hi guys m trying to develop xml matrix report but m totally stuck.value are not expanding vertically.
    RTF tags are here.Plz tell me how can i attach rtf and xml file with this post so you people can help me in better way.
    plz help me its very urgent
    <?for-each:G_1?>
    <?ITEM_CATEGORY?>
    Organization : <?horizontal-break-table:1?>
    <?for-each-group@cell: G_ITEM_CATEGORY; ORGANIZATION_CODE?>
    <? ORGANIZATION_CODE?>
    <?end for-each-group?>
    <?for-each-group: G_ITEM_CATEGORY;ITEM_CODE?> <?ITEM_CODE?>
    <?for-each-group@cell:current-group();ORGANIZATION_CODE ?>
    <?current-group()// AMOUNT?>
    <?end for-each-group?>
    <?end for-each-group?>
    <?end for-each-group?>

    When you say "the values are not expanding vertically" do you mean that on the printed report it is not returning all the values for a given field, i.e. the field is too small to display the entire value.... OR the repeating frame for the group is not expanding enough to display all the fields???

  • SSRS 2008 - Expression for totals in a Matrix

    Hi,
    I have a simple Matrix with the following groups:
    Row Group: Program
    Column Group: Employee
    I need to add a new total column on the right side of the matrix using a simple calculation but I haven't been able to find how to do that other than doing it on the query side. Here's how the Matrix looks like:
    Program
    Employee1
    Employee2
    Employee3
    New Column
    Program1
    45.0%
    0.0%
    87.5%
    Program2
    12.5%
    50.0%
    3.8%
    Program3
    28.8%
    1.3%
    8.7%
    Program4
    1.3%
    23.8%
    0.0%
    Total
    87.6%
    75.1%
    100.0%
    The new column should display the sum of each program divided by the sum of all totals....for example for Program1 the calculation should be (45+0+87.5)/(87.6+75.1+100) which should be equal 50.44% ...the same logic applies for the other
    rows.
    The number of columns (Employees) and rows (Programs) are dynamic, so they change according to who is seeing the report. I'm unable to reference the sum of the total at the bottom row, not sure what I am missing.
    Any input on this is greatly appreciated.

    Hi Cleber,
    I have tested on my local environment and your issue can be caused by you haven't include the scope in the sum function, please find details information below about how to do the calculation:
    Please design the matrix like below:
    You can find the Row Group name is "Program" and the Column Group name is "Empolyee", this will include in the sum expression as below:
    Expression1: =SUM(Fields!Amount.Value,"Empolyee")
    Expression2: =SUM(Fields!Amount.Value,"Program")
    Expression2: =Sum(Fields!Amount.Value,"Program")/Sum(Fields!Amount.Value,"DataSet1")
    Preview you will got the result like below:
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • SSRS Matrix report. Variance expression by Month. Need to compare month from prior year to current month of current year VS2010

    Please help.  I have a matrix report.  In the report I have row group  PO Type.  One the Column groups I have a parent group by Fiscal Year, and then a child group by Month.  When I run the report, I get two years of data back broken
    out by month.  Please see below.
    Now here is where I am getting stuck.  I need to take the variance between the current month of the current year, from the same month of the prior year.  So I need to show the difference between Oct , 2014 from Oct, 2013. November, 2014 from November
    2013... etc. etc.
    In the example below, how do I create a column or row showing the variance for Contracts for October 2014.  I need to take the contracts for October 2014 which is 3 and subtract that from October 2013 which is 8.  Any suggestions? How do I do that
    for each month?  Then I need to do it for the quarter... then the year?  But I'll be happy if I can just get the month working first.
    Any help will be appreciated. 
    here is what my rdl file looks like.
    Here is what my report looks like when I render it.

    Hi Adrian_s2012,
    According to your description, you want to compare values for the month of current year with the month of prior year and get the variance. Right?
    In Reporting Services, we don't have any function to get this "Year to Year" Growth. In this scenario, if you data source is a cube, we suggest you use Analysis Services to achieve your requirement. If this data source is just from database, it will be hardly
    to calculate the variance because we need to compare the values within every two different column group and matrix generate adjacent columns one by one. Even we make it by using custom, every time executing the long code when generating result
    in a cell will reduce a lot of performance, we really don't suggest to do that in SSRS. Here is a thread with much easier requirement, please take a reference of that:
    http://social.msdn.microsoft.com/Forums/office/en-US/842e2dcb-d949-4297-9d91-eac989692cb5/difference-between-the-grouped-column?forum=sqlreportingservices
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • SSRS - Expression to color column value dynamically in Matrix

    Hi ,
    I have a matrix which looks like :
    The <<Expr>> value can be 1 /0 /"-" .
    The Expr value is being calculated dynamically.
    The data set query I am using has a column called due_days.
    In the color expression of the <<Exp>> box I am using the expression as :
    =IIf(Fields!Due_Days.Value>14  and Fields!Notes_Count.Value>0,"Blue",(Iif(Sum(Fields!Notes_Count.Value)=0 ,"Red","Black")))
    My requirement is if the Due_Days column value is >14 then I need to highlight the value as blue else black and if value is 0 then red. When I use the above query it is just highlighting the color blue for 1st column only. Eg: 4th row . Due days for month
    of Oct and Nov is > 14 but it shows blue only for month of oct.
    How can i resolve the issue?

    In select query i have 5 columns:
    Due days(Which is difference between 2 dates) ,
    Notes count (Which is just a count of notes  entered or not having value 0/1  and value '-' if another column CRD is greater than the matrix month and year.)Eg: below date 11/12/2014 is greater than Oct 2014 hence Oct 2014 should have "-"
    Month Name , Year , Month Nbr (last 6 months which I cross joined with the table to get counts for each month)
    The matrix has year and last 6 month  as column groups
    Color coding should be if notes count is 0 then red  ,if notes count is 1 and due_days> 14 then blue else black . When i try to use expression for color as i mentioned above, it colors only 1st colum.eg:  2nd row
    Nov 2014 is blue but for jan 2014 also it should show blue as due days>14 .
    Is there any way i can do that ??
    Eg: data set returns value as :
    Due Days        CRD                              Month         
    Month_Nbr    Year   Notes _Count
    5             2014-11-28 00:00:00.000    December          12         2014       
    0
    5               2014-11-28 00:00:00.000    February           2         2015        
    0
    5             2014-11-28 00:00:00.000    January              1           2015      
    0
    5            2014-11-28 00:00:00.000    November          11          2014       1
    5            2014-11-28 00:00:00.000    October              10          2014        0
    5            2014-11-28 00:00:00.000    September          9           2014         0
    Matrix is of the form :
                  YEAR
                  MONTH
    CRD        Notes_count

  • How to Delete a Specific Cell in a Matrix + plz Give sample code for Lost F

    hello there !!!!
    i m in Great Trouble please help me out..
    i have to search for a specific Column n then i have to validate that portion, similarly after validating i have to add update delete all the fuction apply... so please help me i m very upset.
    Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
            Try
                Dim Count As Int32
                If FormUID.Equals("Allowance") Then
                    If (pVal.BeforeAction = True) And (pVal.ItemUID = "1") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                        If pVal.Row = 0 Then
                            'BubbleEvent = False
                        End If
                        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                        Count = o_Matrix.RowCount()
                        SBO_Application1.MessageBox("Matrix Count is " & o_Matrix.RowCount)
                        Validate(pVal, EventEnum, FormUID, BubbleEvent)
                    End If
                End If
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub
        Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
            Dim Row, ii As Integer
            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
            o_Matrix.FlushToDataSource()
            Try
                For Row = 2 To o_Matrix.RowCount
                    StrName = Convert.ToString(DBtable.GetValue("CardCode", Row - 1)).Trim()''' i got Error over there n rest of my code is also not working pls...
                    StrUId = Convert.ToString(DBtable.GetValue("U_AlwID", Row - 1)).Trim()
                    StrEnter = Convert.ToString(DBtable.GetValue("U_SupEnter", Row - 1)).Trim()
                    StrExist = Convert.ToString(DBtable.GetValue("U_SupExist", Row - 1)).Trim()
                    If Row - 1 < DBtable.Rows.Count - 1 Or (Not (StrName.Equals(String.Empty) And StrUId.Equals(String.Empty) And (StrEnter.Equals(String.Empty) Or StrExist.Equals(String.Empty))) And (Row - 1 = DBtable.Rows.Count - 1)) Then
                        If (Not StrName.Equals(String.Empty)) And ((StrUId.Equals(String.Empty) Or StrEnter.Equals(String.Empty)) Or StrExist.Trim.Equals(String.Empty)) Then
                            SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                            BubbleEvent = False
                            Exit Sub
                        End If
                        For ii = Row To DBtable.Rows.Count - 1
                            If Convert.ToString(DBtable.GetValue("ColName", ii)).Trim().Equals(StrName.Trim()) Then
                                SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Duplication Not Allowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                                oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
                                BubbleEvent = False
                                Exit Sub
                            End If
                        Next
                        If CDbl(StrName) < 0 Then
                            SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                            BubbleEvent = False
                            Exit Sub
                        End If
                    End If
                Next Row
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub

    Hello there
    sir i want to Add Update and delete these three basic operation onto the Matrix, Sir u game me a Sample code of Delete a specific Column...
    Sir can u do me a favour pls leave every thing n just told me how to update a matrix ,like i have to fill the matrix field through the DATABASE table now i want to update the DataBase table from the matrix..
    i just only know thta i have to fill back database table with the help of FLUSHTODATABASE()
    here is my Sample Code...n i have to update in the validate portion...
    Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
            Try
                Dim oCellValue As SAPbouiCOM.EditText
                If FormUID.Equals("Allowance") Then
                    If (pVal.ItemUID = "MatAllow") Then
                        If pVal.Row = 0 Then Exit Sub
                        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                        If (pVal.Row > o_Matrix.RowCount) Then Exit Sub
                        oForm = SBO_Application1.Forms.Item(FormUID)
                        If (pVal.ItemUID = "1" Or EventEnum = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                            If pVal.ColUID = "ColName" And pVal.BeforeAction = True Then
                                If pVal.Row = 0 Then Exit Sub
                                oCellValue = CType(o_Matrix.Columns.Item(pVal.ColUID).Cells.Item(pVal.Row).Specific(), SAPbouiCOM.EditText)
                                If (oCellValue.Value.Trim().Equals(String.Empty) And o_Matrix.RowCount <> pVal.Row) Then
                                    SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Blank Value Not Allowed", )
                                    oCellValue.Active = True
                                    BubbleEvent = False
                                    Exit Sub
                                End If
                            End If
                        End If
                    End If
                End If
                Validate(pVal, EventEnum, FormUID, BubbleEvent)
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub
    Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
            Dim str, str1 As String
            Dim checkbox1, Checkbox2 As SAPbouiCOM.CheckBox
            Dim o_Matrix As SAPbouiCOM.Matrix
            Dim Sum As Integer
            Dim oRecordset As SAPbobsCOM.Recordset
            Dim Container As Integer
            Dim Count As Int32
            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
            oRecordset = o_CompanyObj.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            Try
                For Count = 0 To DBtable.Rows.Count - 1
                    CodeFill = Convert.ToString(DBtable.GetValue("Name", Count).Trme())
                    NameID = Convert.ToString(DBtable.GetValue("ColUID", Count).Trim())
                    Price = Convert.ToString(DBtable.GetValue("ColPrice", Count).Trim())
                    Quantity = Convert.ToString(DBtable.GetValue("ColQuant", Count).Trim())
                    Total = Convert.ToString(DBtable.GetValue("ColTotal", Count).Trim())
                    checkbox1 = o_Matrix.Columns.Item("ColSEnter").Cells.Item(Count).Specific
                    Checkbox2 = o_Matrix.Columns.Item("ColSExist").Cells.Item(Count).Specific
                    If (checkbox1.Checked = True) And (Checkbox2.Checked = True) Then
                        Dim Sql As String
                        Sql = "Update [@Supplier] Set U_Price=' " & Price & " ',U_ID=" & NameID & "Where Name ='" & CodeFill & " '"
                        oRecordset.DoQuery(Sql)
                    End If
                Next Count
                SBO_Application1.MessageBox("Record was Updated")
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub

  • Assign a matrix to a JTable?  Possible?

    OK. I will not know the incomming data matrix untill it is assigned. Is there anyway to put the following matrix into a JTable without a headache? All I see are examples of Object class variables assigned to JTables. If anyone knows how to make this work I will appreciate it very much. Here is what I have come up with as an idea:
            String[][] originalDMatrix;
            // Assigned String Matrix.
            if(Program.printDataMatrix.isSelected()) {
                originalDMatrix = new String[Program.matrix.length][];
                for(int i = 0; i < Program.matrix.length; i++) {
                    originalDMatrix[i] = new String[Program.matrix.length];
    for (int j = 0; j < Program.matrix[i].length; j++) {
    originalDMatrix[i][j] = Program.matrix[i][j];
    // Create the table and give it the matrix THIS IS WHERE IT WONT WORK.
    final JTable originalDMatrixT = new JTable(originalDMatrix);
    [/code[
    ERROR OUTPUT:
    cannot resolve symbol
    symbol : constructor JTable (java.lang.String[][])
    location: class javax.swing.JTable
    final JTable originalDMatrixT = new JTable(originalDMatrix);
    ^
    1 error
    Errors compiling Results.

    Changing to strings gave same result but with Object:
    symbol  : constructor JTable (java.lang.Object[][])
    location: class javax.swing.JTable
            final JTable originalDMatrixT = new JTable(originalDMatrix);
                                            ^
    1 error

  • Event dead loop in updating column value of a matrix

    Hi,
    I need to do some auto calculation in a matrix. In my matrix, i have column A and B. If user enter a value in column A and leave the column then my add-on will do some calculation and assign a new value to column B, same thing on column B. In my event filtering, i use
    "pVal.FormType == xxx && pVal.ItemUID == "xx" && pVal.ColUID == "U_xx" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_LOST_FOCUS && !pVal.BeforeAction"
    to capture the event. But then my add-on enter into a dead loop. It seems when i write a value to column B in column A event it will trigger LOST_FOCUS event in column B and then it trigger same event of column A, and then it enters into a dead loop. In SAP B1 client, i can see the two columns start refreshing endlessly.
    Apparently, when assigning a value into a column B during event of column A, it will trigger LOST_FOCUS event of column B. That's the only reason i strongly suspect that.  Is there any one know the solution for my situation?
    Thanks,
    Lan
    P.S. i first get the object of the textbox in the matrix, and use "oEditText.value = new_value" to assign the value.
    Edited by: ZHANGLAN on Jul 8, 2010 2:26 AM

    Hi
    Why didn't you try the Validate event instead of Lost focus. That is pretty easy for such calculations.
    "pVal.FormType == xxx && pVal.ItemUID == "xx" && pVal.ColUID == "U_xx" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_Validate && !pVal.BeforeAction"
    Thanks
    Anoop

  • DateField not getting copy in the matrix using Datasource & Datatable

    Hello All,
    I have tried to copy data From Purchase Order Tables to my own created User Defined Form matrix columns using DBDatasource & Datatables ,Instead of Document Date all other data are getting copied but that document date field is not
    getting the data plus it is not showing any error message as such.
    Following is the code which i have written :-
    =====================================
    oPurchase_Amend.DataSources.DataTables.Add("oMatrixDT" )
    oPurchase_Amend.DataSources.DataTables.Item("oMatrixDT" ).Clear()
    Dim sSQL As String = "SELECT T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[Price],(Select InvntryUoM From OITM Where ItemCode=T1.ItemCode) as 'UoM',T1.LineNum,T0.DocNum  as 'FrmDate' FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[DocNum] ='1' and T0.CardCode='C0001'
    oPurchase_Amend.DataSources.DataTables.Item("oMatrixDT" ).ExecuteQuery(sSQL)
    oMatrix = oPurchase_Amend.Items.Item("mtx_0").Specific
    oMatrix.Clear()
    Dim oDBDataSource As SAPbouiCOM.DBDataSource = oPurchase_Amend.DataSources.DBDataSources.Item("@OSL_POAMD")
    Dim oDataTable As SAPbouiCOM.DataTable = oPurchase_Amend.DataSources.DataTables.Item("oMatrixDT" )
    oDBDataSource.Clear()
    For row As Integer = 0 To oDataTable.Rows.Count - 1
    Dim offset As Integer = oDBDataSource.Size
    oDBDataSource.InsertRecord(row)
    oDBDataSource.SetValue("U_ItemCode", offset, oDataTable.GetValue("ItemCode", row).ToString())
    oDBDataSource.SetValue("U_ItemName", offset, oDataTable.GetValue("Dscription", row).ToString())
    oDBDataSource.SetValue("U_UoM", offset, oDataTable.GetValue("UoM", row).ToString())
    oDBDataSource.SetValue("U_OldQty", offset, oDataTable.GetValue("Quantity", row).ToString())
    oDBDataSource.SetValue("U_OldRate", offset, oDataTable.GetValue("Price", row).ToString())
    > Line For Copying Document Date Data to the matrix datasource
    oDBDataSource.SetValue("U_OldDate", offset, oDataTable.GetValue("FrmDate", row))
    oDBDataSource.SetValue("U_LineId", offset, oDataTable.GetValue("LineNum", row))
      Next
    '--- Rebinding the datasource to the matrix columns -
    oMatrix.Columns.Item("col_0").DataBind.SetBound(True, "@OSL_POAMD", "U_ItemCode")
    oMatrix.Columns.Item("col_1").DataBind.SetBound(True, "@OSL_POAMD", "U_ItemName")
    oMatrix.Columns.Item("col_3").DataBind.SetBound(True, "@OSL_POAMD", "U_OldQty")
    oMatrix.Columns.Item("col_5").DataBind.SetBound(True, "@OSL_POAMD", "U_OldRate")
    oMatrix.Columns.Item("col_7").DataBind.SetBound(True, "@OSL_POAMD", "U_OldDate")
    oMatrix.Columns.Item("col_9").DataBind.SetBound(True, "@OSL_POAMD", "U_LineId")
    oMatrix.LoadFromDataSource()
    But i am not able to get the document date in the column of the matrix .
    Please suggest what changes i have to meke in this code to get the desired output.
    Thanks & Regards,
    Amit
    Edited by: AmitSharma_061985 on Dec 17, 2009 12:24 PM

    Hi Michael,
    FrmDate is the Document date of the purchase order which i am fetching through sql query and trying to copy that in the matrix
    through datasource .
    Edited by: AmitSharma_061985 on Dec 18, 2009 7:07 AM

  • Photo Matrix from folder

    Hello how are you?
    I really really need your help.
    I have an aleatory number of squared pictures (ex: 4x4 of 6x6, or 10x10, etc) that may change everytime.
    These files together become a "big picture".
    What I want is an action to photoshop make a collage respecting the number of rows and collumns.
    So, row 1 would have: Picture 1.png in collum 1; picture 2.png in collum 2
    than row 2 would have: picture 3.png in collum 1; picture 4.png in collum 2
    How can I do that?
    Can I make an action that if I settle the matrix size, photoshop can take all the pictures from one folder and fulfill that matrix?
    Thank you so much!
    L2berzins

    Hello!  I cannot believe I could have all these help in such a short time, you guys are amazing!!!
    I am really a beginner, so yall are my photoshop guides! So I am sorry if I have so many questions.
    What I am looking for is much much more simple than what i have been reading from you guys. 
    I am a beginner and i don't know what I am doing.
    I saw the script, thank you, but First of all (and most important):
    how do I save the script?
    where do I save the script?
    and how do i run the script?
    So, hands on:
    I went to your web page, I thought I was the only one in the world trying to do this crazy thing, so I was releived that I could have some help.
    I saw that your final result is a poster that have 4 collums x 14 lines, with no border and no spacing.
    I work in an orphanage and I have a folder 4x4 (640 pixels x 640 pixels) pictures in alphabetic order
    What I want is:
    a square poster, that the number os lines is equal the number of collumns.
    I will receive a folder with images that all of them are either .jpg or .png, in alphabetic order, 640 pixels x 640 pixels.
    What I DONT WANT is:
    Neither of the pictures cannot have any alteration (size, resolution, dpi, colors, etc)
    No border and no spacing
    I CANNOT be aleatory, it has to follow the alphabetic order
    I dont want them to be in different layers
    I dont want to use alpha channels
    I just want the square shape, pictures to be side by side,  in alphabetic order, like in your example
    If my folder have pictures from zero to 15, the final poster with 4 collumns x 4 rows would be:
    picture0.jpg   picture1.jpg   picture2.jpg   picture3.ppg
    picutre4.jpg   picture5.jpg   picture6.jpg   picture 7.jpg
    picture8.jpg   picture9.jpg   picture10.jpg picture11.jpg
    picture12.jpg picture13.jpg picture14.jpg picture15.jpg
    Can this be a simple action?
    Thank you all so much,
    [ unreadable colors removed by admin ]

  • Urgent HELP required on forming the Matrix of data using PL/SQL

    Hi All,
    I'm new to this thread and require your urgent help in this regard.
    I've got a requirement for building a 5000 X 5000 matrix using PL/SQL. My original data tables have 5000 rows each and I need to do a correlation analysis using this data and need to store in a physical table and not in-memory. Is this feat achievable using mere PL/SQL? I understand that Oracle DB has a limitation of 1000 columns(but not sure) and hence I'd like to know whether there is any work-around for such scenarios. If not, what are the other alternative method(s) to achieve this feat? Do I need to use any 3rd party tools to get this done? An early reply from the experts is highly appreciated.
    Thanking you all Gurus in advance.
    Rgds
    Sai

    Welcome to OTN!
    I'll get to your quesiton in a moment, but first some welcome information. Many OTN posters consider it impolite to mark threads as "urgent". We are volunteers and have jobs of our own to do without people we don't know making demands. You are brand new and deserve some patience but please understand this. It is very likely before I finish this post someone will complain about the word "urgent" in your subject.
    On to more interesting things :)
    You can do the matrix, but are out of luck with a 5000 x 5000 table because Oracle only allows 1000 columns per table. There are ways to work around this.
    How do do the matrix depends on what you want to do. You can do this different ways. You can create a table beforehand and use PL/SQL or simple SQL to populate it, or use the CREATE TABLE AS syntax to create and populate it in one step if you can get the underlying SQL to work the way you want, something like
    create table my_table as
      select a.*, b.*
        from table1 a, table2 bcan populate a matrix from 2 tables with an intentional cartesian join (the WHERE clause was left out intentionally, provided your data is already in the data base.
    If not you can use a PL/SQL routine to populate the data.
    There are a couple of ways to solve the 1000 column limit. The easiest way might be to have 5 collections of 1000 columns each. A more complicated but more elegant soltion would be to have nested collections, allowing 2 colliections that you can loop through - a collection of collections. Nested collections can be hard to work with. A third way would be to use nested tables in the database but I personally do not like them and the insert, update, and delete statements for nested tables are hard to use.
    I'm not going to give a code example because I am not sure which solution is best for you. If you have further questions post them.

  • Urgent help required in creating matrix table report

    Hi
    I need a report in the below format with subtotal and total and custom order of columns and rows. I tried in using grouping and conditional region format but i am not getting the exact result.
         product2 product 1 product 3 Total
         Asia
         India 10 20 30 60
         Europe
         london 20 30 40 90
    Germany 30 40 50 120
    Europe total 50 70 90 210
    Full total 60 90 120 270
    india,london,germany in field region
    product 1, product2 product3 in field sales
    measures in total amount field
    I tried to use the pivot table but their no option for total and custom ordering for rows and columns and i am not getting the exact format. Please suggest me a method or procedure to get exact result as shown above.
    Thanks and regards
    sandy
    Edited by: user2989722 on Mar 31, 2010 11:45 PM

    hi
    I am attaching my xml please help me out in creating a matrix report.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ROWSET>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 1 [0 - .15]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>2307.165535041</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.475123902700634</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>30.2162475006637</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>1632.57338858</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>422.436554415462</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 10 (10 - 20]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>17137.13228197</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.405705629282986</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>207.096250125078</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>5783.36069429</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>26.7447698210976</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 11 (20 - 100]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>176.01654684</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.507714108946292</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>281.219317996251</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>6.35288644</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>33.5503479625902</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 12 Default</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>4701.426500882</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.448602202841554</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>100.000000024971</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>722.25731111</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>17.1137302584326</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 4 (.35 - .5]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>20075.347155131</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.435471063386539</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>65.043256695741</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>19214.33530761</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>39.8394919447153</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 6 (.75 - 1.35]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>55148.040085827</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.406837969201374</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>90.9915692969898</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>35168.28645631</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>24.2323573228287</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 7 (1.35 - 2.5]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>80782.306502494</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.401398105436061</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>104.939383907255</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>29327.09937088</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>64.5404944514989</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 9 (5.5 - 10]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>19918.353466582</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.403197283094678</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>145.38568228759</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>6968.38716055</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>22.4602872356297</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD3 (.25 - .35]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>4659.00625848</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.437222745016593</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>49.7763165044685</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>6328.43285318</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>56.9420433188724</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 1 [0 - .15]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>92099.47315523</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.49290316215652</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>8.1614679611239</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>40865.81313468</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.490255140986887</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 10 (10 - 20]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>5978.77892414</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.462986581515473</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>236.956154182651</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>38.17433944</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.220028397461449</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 11 (20 - 100]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>7996.70429901</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.487633014729318</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>211.059294848823</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>67.39087733</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.262386150656619</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 12 Default</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>5680.79501712</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.364996338745224</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>100.000000120142</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>9.44825003</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.274957460858617</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 2 (.15 - .25]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>18412.32474058</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.565813759474568</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>22.0959615585123</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>3375.14793919</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.31511224146282</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 4 (.35 - .5]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>8998.50534758</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.564193157888767</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>38.7032364619711</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>742.52198983</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.259162668085142</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 5 (.5 - .75]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>8566.81402593</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.551881376840796</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>49.4634096178362</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>404.85624382</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>2.51892931053278</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 6 (.75 - 1.35]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>10002.21838595</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.530272891319008</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>66.6791470811157</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>404.88147998</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.212464766871609</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 7 (1.35 - 2.5]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>10005.26092357</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.500044162824778</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>93.5636951722772</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>-490.56397567</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>46.4764541038698</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 8 (2.5 - 5.5]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>11226.21172151</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.468571958403512</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>131.927474849119</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>110.85147102</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.214124061873538</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 9 (5.5 - 10]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>5963.41956141</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.466066773663567</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>185.088689160792</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>51.01957931</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.224693875694723</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    - <ROW>
    <_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
    <_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD3 (.25 - .35]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
    <_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>9956.41682925</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.55994575388673</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>29.9353533062809</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
    <_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>1216.31690239</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
    <_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.28824424910818</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
    </ROW>
    >

  • Matrix-like PKs based on three optional IN-constrained strings?

    Hello,
    I have a DB of actions that I want to represent. I want to model a number of actions as you know them from classic GUIs:
    open
    openFile
    saveAs
    exportToDirectory
    reverseEngineerFromDatabase
    As I analyzed the problem, I came to the conclusion, the keys above (which they ultimately are) have at least three parts:
    1. an action: VARCHAR(20) CHECK (action IN ('open', 'save', 'export', 'reverseEngineer', ...))
    2. a preposition: VARCHAR(4) CHECK (preposition IN ('as', 'to', 'from', ...))
    3. a target: VARCHAR(20) CHECK (target IN ('file', 'directory', 'database', ...))
    So the rule to construct the final key would be:
    <action> + <preposition> + <target>
    to model all sorts of combinations/permutations (forget about uppercasing the preposition and target if there for a moment).
    As you can see from the strings, I have three dimensions of predefined values from which I construct the final key. Not every combination is possible, I want to represent valid combinations by an extra table having entries like:
    INSERT INTO ValidActions ('open', '', '')
    INSERT INTO ValidActions ('open', '', 'file')
    INSERT INTO ValidActions ('save', 'as')
    INSERT INTO ValidActions ('export', 'to', 'directory')
    INSERT INTO ValidActions ('reverseEngineer', 'from', 'database')
    My question is now:
    How do I solve this, given that the PK is composed of ... PRIMARY KEY (action, preposition, target) ... and that an action has an OPTIONAL preposition and target? I have not come to a final decision, but I might relax the action to be optional, too, and then demand that either <action> OR <target> MUST be set.
    How do I model matrix-like composed PKs consisting of a number of optionals? I currently see no other way of adding empty strings '' to the check constraint, however AFAIK Oracle does not make a difference between NULL and the empty string ''. How would such a solution look like?
    I could use the final string as PK, but how do I make sure that string consists of the predefined ones only?
    Karsten
    PS: note action and target are actually two separate tables.

    What about using a model like this? I used surrogate keys because I wasn't sure if the ACTION, PREPOSITION and TARGET values were truly immutable. You could easily remove these from the model and use the respective columns as the PK for each table.
    DROP TABLE ACT_PRE_TAR;
    DROP TABLE ACTIONS;
    CREATE TABLE ACTIONS
            ACTION_ID       NUMBER  PRIMARY KEY
    ,       ACTION          VARCHAR2(15) NOT NULL
    ,       CONSTRAINT ACTION#UNQ UNIQUE (ACTION)
    INSERT INTO ACTIONS VALUES(1,'open');
    INSERT INTO ACTIONS VALUES(2,'save');
    INSERT INTO ACTIONS VALUES(3,'export');
    INSERT INTO ACTIONS VALUES(4,'reverseEngineer');
    DROP TABLE PREPOSITIONS;
    CREATE TABLE PREPOSITIONS
            PREPOSITION_ID  NUMBER  PRIMARY KEY
    ,       PREPOSITION     VARCHAR2(10) NOT NULL
    ,       CONSTRAINT PREPOSITION#UNQ UNIQUE (PREPOSITION)
    INSERT INTO PREPOSITIONS VALUES (1,'as');
    INSERT INTO PREPOSITIONS VALUES (2,'to');
    INSERT INTO PREPOSITIONS VALUES (3,'from');
    DROP TABLE TARGETS;
    CREATE TABLE TARGETS
            TARGET_ID       NUMBER  PRIMARY KEY
    ,       TARGET          VARCHAR2(10) NOT NULL
    ,       CONSTRAINT TARGETS#UNQ UNIQUE (TARGET)
    INSERT INTO TARGETS VALUES (1,'file');
    INSERT INTO TARGETS VALUES (2,'directory');
    INSERT INTO TARGETS VALUES (3,'database');
    CREATE TABLE ACT_PRE_TAR
            ACTION_ID       NUMBER  REFERENCES ACTIONS(ACTION_ID)
    ,       PREPOSITION_ID  NUMBER  REFERENCES PREPOSITIONS(PREPOSITION_ID)
    ,       TARGET_ID       NUMBER  REFERENCES TARGETS(TARGET_ID)
    ,       CONSTRAINT ACT_PRE_TAR#UNQ UNIQUE (ACTION_ID, PREPOSITION_ID, TARGET_ID)
    );Based on your sample data the following result is produced:
    SQL> SELECT  ACTION
      2  ,       PREPOSITION
      3  ,       TARGET
      4  FROM            ACT_PRE_TAR
      5  LEFT OUTER JOIN ACTIONS         ON ACTIONS.ACTION_ID            = ACT_PRE_TAR.ACTION_ID
      6  LEFT OUTER JOIN PREPOSITIONS    ON PREPOSITIONS.PREPOSITION_ID  = ACT_PRE_TAR.PREPOSITION_ID
      7  LEFT OUTER JOIN TARGETS         ON TARGETS.TARGET_ID            = ACT_PRE_TAR.TARGET_ID
      8  /
    ACTION          PREPOSITIO TARGET
    open
    open                       file
    save            as
    export          to         directory
    reverseEngineer from       database

Maybe you are looking for

  • Lenovo s860 1Gb RAM not recognized by the computer,camera and gallery problem

    Hi,yesterday i received a shipment of 2 phones s860. Both are installed VibeUi .20 same version. No problems with 1 of them, but other... 1.Camera can't save image.When thry to get picture,camera app close, same problem with another camera app. and a

  • PDF conversion from Word 2010 incredibly slow and loses format

    Just moved onto new laptop with Windows 7 Word 2010 and downloaded Acrobat 9 Pro trial.  Have used Acrobat 8 with Word 2007 and earlier versions with no problems. Now taking half an hour to convert a document and cutting out margins.  Just today I wa

  • Inserting images in reports

    Hi, I am trying to dynamically insert icons in my template. The icon paths are provided by the XML data definition via the <?Item_icon> field. It doesn’t work if I write a syntax like: <fo:external-graphic src="url(Item_icon)" /> However, the syntax

  • How can I capture phone numbers of incoming calls?

    I want to capture the phone numbers of incoming calls. There seems to be know way to even copy and paste them. I know the must be a simple solution, what is it?

  • Additional fields in Bank Account configuration (FI12)

    Hi, Is there a customizing option to update table TFIBLSCREEN ?. We want to set visible the field "Reference Data" in the Bank Account View in the customizing FI12 (V_T012K-REFZL in program SAPLFHBANKC ). Thanks in advance. Andrés.