Concatenat​e matrix

Hi,
I have problems for concatenate two matrix with the same columns but different rows. How Can I do it? Is there any block to automatically do it for me or I must do a for loop and make it manually?
Thanks,
ToNi.

It works,
Thanks very much Paulo
ToNi.

Similar Messages

  • Get text frame's angle of rotation

    Hello. Does anyone know if there's a way to get/return a text frame's angle of rotation? I've searched through the CS4 AppleScript documentation and the closest I found was a text frame's "matrix" property which seems to be used to rotate an object but not return an object's current angle of rotation. (There is a character rotation property but this seems to return the rotation of each character in the text frame, not the text frame as a whole.)
    Ben

    I don't think you need to go to Ruby or satimage for this. Neat though it is to figure out the math of the matrix and implement this yourselves, Illustrator's scripting dictionary has the commands to make Illustrator translate an angle to a matrix value and vice versa:
    see
    concatenate rotation matrix
    and
    get rotation matrix
    in the language dictionary.
    There are the equivalent commands for scale and translation matrices too.
    In the Illustrator CS6 Applescript Dictionary, I'm looking at Page 99.

  • How can I use a web app to provide me with results from a matrix?

    I have a need to set up a search type box based off a matrix. This is a matrix which shows a list of zip codes down the left column, and a list of products across the top, and the corresponding field from a zip code and a product is the freight rate.
    e.g.
              Product 1     Product 2     Product 3     Product 4
    1234     $10               $12               $14               $16
    4567     $11               $11               $13               $17
    5678     $55               $54               $27               $35    
    so the freight rate to 4567 for product 3 is $13.
    Then what i want to have is a drop down list for a customer to select the product, then a field to enter their zip code, and the search result will be the cross referenced freight rate.
    Is this possible? If so, can someone guide me as to how this would be done?

    Throw this open to the community to chip in, but off the top of my head.... thinking of something along lines of:
    Create 3 web apps,
    Product (Fields Product Name & ProductID)
    Zipcode (Fields Area Desc & Zipcode)
    Freight Rates (Fields FreightRateID (made up of ProductID_ZipCode), Freight Rate)
    Create a web app search form for Web App Freight Rates with:
    Product select, with options drawn from web app 1 using ProductID for value.
    Zipcode select, with options drawn from web app 2 using Zipcode for value.
    Hidden FreightRateID field.
    Once a visitor has selected their product and zipcode, using javascript concatenate the selected ProductID with selected Zipcode.
    This will produce a FreightRateID (e.g. PROD1_4567), which can be loaded into the hidden FreightRateID field.
    When submitted, it will perform a web app search for a Freight Rate that matches the chosen product and zipcode, ie. FreightRateID.
    To make entry of the freight rates easier, maybe add 2 datasource fields to the Freight Rate web app for Product and Zipcode.
    Then create a front end web app add/edit (via a secure zone) to allow entry to be done by:
    Select product, select zipcode then enter freight rate.  (FreightRateID can be created and populated in same way as search above)

  • Dynamic Smartform - Matrix structure

    Hi All
    i have a requirement to create a table dynamically in a matrix format. i am new to smartforms
    scenario is something like
    1) My internal table structure
    *Article   Store     Quantity*
    1a         S303         2
    2a         S304            3
    3a          S305         2
    4a          S306         4
    5a         S307         5
    1b         S303         2
    2b         S304         3
    3b         S305         2
    4b         S306         4
    5b         S307         5
    i want my smartform to be like
    *Article     S303         S304     S305         S306     S307*
    1a              2          3               2           4                5
    1b              2          3               2           4            5
    suggest me how can i achieve this.thanks in advance.
    Internal table structure may vary time to time
    Regards
    Chaitanya.A

    Article   Store     Quantity
    1a         S303         2
    2a         S304         3
    3a          S305         2
    4a          S306         4
    5a         S307         5
    1b         S303         2
    2b         S304         3
    3b         S305         2
    4b         S306         4
    5b         S307         5
    for this same internal table you have one more filed like char1.
    new internal table is
    Article   Store     Quantity   char1
    1a         S303         2           a
    2a         S304         3           a
    3a          S305         2            a
    4a          S306         4            a
    5a         S307         5            a
    1b         S303         2             b
    2b         S304         3            b
    3b         S305         2             b
    4b         S306         4          b
    5b         S307         5           b
    here you can take 2 varibles like
    data: var1 type char 250,
            var2 type char250,
            lv_n(3)   type n.
    lv_n = 20
    loop at newitab into wa_itab.
    concatenate ' 10 char space'  wa_itab-store  into var1+lv_n(20).
    concatenate ' 10 char space'  wa_itab-Quantity into var2+lv_n(20). .
    at end of char1.
    append var1 to final  interbal table
    append var2 to final  interbal table
    clear lv_n.
    lv_n = 20.
    endat.
    lv_n = lv_n + 20.
    endloop.

  • Math / array / matrix-question

    Hallo everybody,
    first of all: it's not a indesignscripting-  but general math-javascriptquestion. please be patient
    I've got a first (matrixlike-)array (won't change)
    var containers = [
    'container11', 'container12', 'container13', 'container14', 'container15',
    'container21', 'container22', 'container23', 'container24', 'container25',
    'container31', 'container32', 'container33', 'container34', 'container35',
    'container41', 'container42', 'container43', 'container44', 'container45',
    'container51', 'container52', 'container53', 'container54', 'container55'
    and I've got a second array:
    ["container14", "container25", "container34", "container44", "container54"] //this array may contain 3 up to 8 items
    My aim is to check if a part of 5 to 3 items of the second array is part of or equal to a row or column of the matrix-like-array.
    For example: "container34", "container44", "container54" or "container11", "container12", "container13", "container14" (as part of second array) would be a result I#m looking for. Note: I only want to find the 'biggest charge'!
    Hope it's getting clear and one of the math-cracks will have a idea.
    Addittional: there's no MUST to work with arrays. I can also store the data to a object or mixture ... and may fill it with numbers instead of strings ...
    To get it visible:
    https://dl.dropboxusercontent.com/spa/3ftsuc9opmid3j4/Exports/fourWins/fourWins.html
    Items can be dragged and dropped. After every dropp the arrays have to be compared ... and I#m searching for a nice and elegant solution
    May be someone's interested
    Hans

    Hi Hans,
    Just a quick note although your question is solved.
    Provided that your matrix is 5×5 you could easily map any element to a single character in the set { A, B..., Z } (for example).
    Then your problem can be reduced to some pattern matching algorithm, that is, finding the longest part of the input string within a 'flat string' that just concatenates the rows and the columns of the search matrix in the form ROW1|ROW2...|COL1|COL2...|COL5
    And you can create RegExp on the fly to compute the solution(s) with almost no effort:
    const MX_ORDER = 5;
    const MIN_MATCH = 3; // We need at least 3 contiguous items
    var bestMatrixMatch = function F(/*str[]*/ROWS, /*str*/ND)
    // NB: No check is made on ROWS, so make sure you supply
    //     MX_ORDER strings, each being MX_ORDER-sized
        // Put in cache some subroutines
        F.RES_TO_STR ||(F.RES_TO_STR = function()
                return localize("'%1' found in %2", this.result, this.location);
        F.ROWS_TO_HS ||(F.ROWS_TO_HS = function(R, C,i,j)
                for( i=0,C=[] ; i < MX_ORDER ; ++i )
                for( C[i]='',j=0 ; j < MX_ORDER ; C[i]+=R[j++][i] );
                return R.concat(C).join('|');
        // Vars
        var haystack = F.ROWS_TO_HS(ROWS),
            candidates = ND &&
                haystack.match( new RegExp('['+ND+']{'+MIN_MATCH+',}','g') ),
            t, p;
        if( !candidates ) return null;
        // Sort the candidates by increasing size
        candidates.sort( function(x,y){return x.length-y.length} );
        // Grab the matches and keep the best
        while( t=candidates.pop() )
            if( 0 > ND.indexOf(t) ) continue;
            p = 1+~~(haystack.indexOf(t)/(1+MX_ORDER));
            return {
                result:   t,
                location: (p<=MX_ORDER)?('Row #'+p):('Col #'+(p-MX_ORDER)),
                toString: F.RES_TO_STR,
        return null;
    // =================
    // Sample code
    // =================
    var rows = [
        "ABCDE",
        "FGHIJ",
        "KLMNO",
        "PQRST",
        "UVWXY"
    var needle = "EKLMINSX";
    // get the result
    var result = bestMatrixMatch(rows, needle);
    alert(
        "Searching the longest part of '" + needle + "' in:\r\r" +
        ' '+rows.join('\r').split('').join(' ') +
        '\r\r===============\r\r' +
        (result || "No result.")
    @+
    Marc

  • AffineTransform.Concatenate: Anyone got a clue why they do it this way?

    For those who don't know, AffineTransforms need to be built backward. In other words, you start with the last operation, then add the second to last one, etc etc.
    For more information, see AffineTransform.concatenate and preConcatenate.
    Question: Wouldn't it be more intuitive to do it the other way, and use preConcatenate in the rotate/translate etc methods? It looks like you could just switch the order the matrices are multiplied in... Is there any reason that it's been set up this way?
    I think maybe I learned why somewhere, but I've forgotten...

    tjacobs01 wrote:
    For those who don't know, AffineTransforms need to be built backward. In other words, you start with the last operation, then add the second to last one, etc etc.
    For more information, see AffineTransform.concatenate and preConcatenate.
    Question: Wouldn't it be more intuitive to do it the other way, and use preConcatenate in the rotate/translate etc methods? It looks like you could just switch the order the matrices are multiplied in... Is there any reason that it's been set up this way?
    I think maybe I learned why somewhere, but I've forgotten...You can think of the affine transformations as forming a stack. At the bottom is the user space-to-device space transformation. This transformation may be the identity transformation or it may be something else (e.g a translation from the top left corner of the screen to the top left corner of the component that you are paining). What it is depends on the platform (Unix/Linux, Windows, Mac OS X), and an application programmer doesn't need to care what it is, only that it is there and must be kept there. To keep this transformation at the bottom of the stack, you need to add other transformations above it. The transformations are applied in a top-down order, with the transformation at the bottom applied last.
    Now, the stack is not a real stack but a product of transformation matrices. Last transformation applied (i.e., the user space-to-device space transformation) is the leftmost matrix in this product (as defined in linear algebra). Additional transformations are right-multiplied, i.e. concatenated. If they had been pre-concatenated, then the user space-to-device-space transformation would not be the last transformation applied.

  • Neo, whats up with this Matrix stuff?

    I want to evaluate text frames for their x axis and if they are the same shift them slightly because of adobes irritating habit of combining the text frames when it makes a PDF. I have been able to evaluate, but not exactly like I want to but I know it can be done...
    var mydoc = app.activeDocument;
    var mytext = mydoc.textFrames;
    var allX_Vaues = new Array();
    for (i =0; i < mytext.length; i++) {
    var mytextFrames = mydoc.textFrames[i];
    var theMatrix = mytextFrames.matrix;
    allX_Vaues.push(theMatrix.mValueTX)
    var firstEval = allX_Vaues
    //$.writeln(theMatrix.mValueA+"\r"+theMatrix.mValueB+"\r"+theMatrix.mValueC+"\r"+theMatrix .mValueD+"\r"+theMatrix.mValueTX+"\r"+theMatrix.mValueTY);
    //alert(allX_Vaues);
    //alert(allX_Vaues[1]);
    for (i =0; i < allX_Vaues.length; i++) {
    if (allX_Vaues[i] == allX_Vaues[i + 1] ) {
    alert(allX_Vaues[i] + " and " + allX_Vaues[i +1] + " are the same");
    else
    alert(allX_Vaues[i] + " and " + allX_Vaues[i +1] + " are different");
    my problem is when I try to move text frames...
       var mydoc = app.activeDocument;
        var mytext = mydoc.textFrames[0];
        var matrixValue = mytext.matrix.mValueTX
        var addToMatrix = 1
        var moveMatrix = app.getTranslationMatrix(theMatrix);
        var totalMatrix = concatenateTranslationMatrix(moveMatrix, addToMatrix)
        mytext.transform(totalMatrix);
        //alert(moveMatrix);
    It flies way of the page. I just want to move the text a slight amount and concatenate is the only way I have been successful. my question is: Is there a better way and why is my text flying so far of the page?
    any help would be appreciated,
    Duane

    Thanks for the help Carlos. I finished my script but I have a problem with some files giving me a false mValueTX value. I am looking at a file that has two numbers diagonal from each other and they are showing the same value for mValueTX. I copy past those two numbers from that file to a new one and check there x value and it gives me the values that are not the same, like it should. do you have any idea why it would do this?
    my script for staggering the text.
    staggerText ();
    //       This function staggerText
    function staggerText () {
    var mydoc = app.activeDocument;
    var mylayer = mydoc.activeLayer;
    var mytext = mylayer.textFrames;
    var mainTF = 0;
    checkTextOver ();
    function checkTextOver () {
        var allX_Values = new Array();
        var allY_Values = new Array();
        var deltaX = 01; // distance to move in X direction
        var deltaY = 0;
        //alert( " inside checkTextOver mainTF = " + mainTF);
        for (a =0; a < mytext.length; a++) { // for loop is for cycling through the I value. in this case the textFrames[i] to evaluate the matrix and save the X axis value in an array
            var mytextFrames = mydoc.textFrames[a]; // this is the current textFrame in the cycle
            var theMatrix_X = mytextFrames.matrix; // to load the matrix to a value
            allX_Values.push(theMatrix_X.mValueTX); // adds theMatrix.mValueTX to the array
            //alert("The X array " +allX_Values); // alert you of the Values added to the array every cycle
        //alert("has finished X array");
        for (b =0; b < mytext.length; b++) { // for loop is for cycling through the I value. in this case the textFrames[i] to evaluate the matrix and save the Y axis value in an array
            var mytextFrames = mydoc.textFrames[b]; // this is the current textFrame in the cycle
            var theMatrix_Y = mytextFrames.matrix; // to load the matrix to a value
            allY_Values.push(theMatrix_Y.mValueTY); // adds theMatrix.mValueTY to the array
            //alert("The y array " + allY_Values); // alert you of the Values added to the array every cycle
        //alert("has finished Y array");
        for (i =0; i < allY_Values.length; i++) {
            var differenceOfY = allY_Values[mainTF] - allY_Values[i];
            var textCountPerFrameSecond = mytext[i].textRange.length;    
            if(mainTF < i) {       
                var textCountPerFrameFirst = mytext[mainTF].textRange.length;
                //alert("differenceOfY = " + differenceOfY + "\r" + "allY_Values[mainTF] = " + allY_Values[mainTF] +  "\r" + "allY_Values[i] = " + allY_Values[i] +  "\r" + "allX_Values[mainTF] = "  + allX_Values[mainTF] +  "\r" + "allX_Values[i] = " + allX_Values[i] + "\r"+ "The mainTF = " + mainTF + "\r" + "The Second value is = " +  i + "\r" +  "textFrame " + mytext[mainTF].contents + " against textFrame " + mytext[i].contents +  "\r" +  "First frame and Second frame = " + (textCountPerFrameFirst + textCountPerFrameSecond));
                //alert(mainTF + " is less that" + i);             // alert("differenceOfY = " + differenceOfY + "\r" + "allY_Values[mainTF] = " + allY_Values[mainTF] + "\r" + "allY_Values[i] = " + allY_Values[i] + "\r"+ "The mainTF = " + mainTF + "\r" + "The Second value is = " + i + "\r" + allY_Values + "\r" + "textFrame " + mytext[mainTF].contents + " against textFrame " + mytext[i].contents);
                if(differenceOfY < 15 && differenceOfY > -15 && allX_Values[mainTF] === allX_Values[i] && textCountPerFrameFirst + textCountPerFrameSecond === 2) {
                     // alert( textCountPerFrameFirst + textCountPerFrameSecond); //alert("made it past the difference of Y. So " + differenceOfY + "must be between 16 and -16" );                 //alert("made it past the alignment of x. " + allX_Values[mainTF] + " is the same as " + allX_Values[i] );                // var theNextValue = allX_Values[i];
                     alert("differenceOfY = " + differenceOfY + "\r" + "allY_Values[mainTF] = " + allY_Values[mainTF] +  "\r" + "allY_Values[i] = " + allY_Values[i] +  "\r" + "allX_Values[mainTF] = "  + allX_Values[mainTF] +  "\r" + "allX_Values[i] = " + allX_Values[i] + "\r"+ "The mainTF = " + mainTF + "\r" + "The Second value is = " +  i + "\r" +  "textFrame " + mytext[mainTF].contents + " against textFrame " + mytext[i].contents +  "\r" +  "First frame and Second frame = " + (textCountPerFrameFirst + textCountPerFrameSecond));
                     mytext[i].translate (deltaX, deltaY);
                     //alert("frame " + mainTF + " has and X value of "+ allX_Values[mainTF] + "\r" + "frame " + + " has and X value of "+ allX_Values[i]  + "\r" + " these are the same");                 // alert(i + " is less or equal to " + allX_Values.length);  //alert(" my array is " + allX_Values);
             //alert("the end " + differenceOfY);     resetTextFrame ();
         resetTextFrame ();
    function resetTextFrame () {
        if (mainTF <= mytext.length) {
            mainTF = mainTF + 1;
            // alert( " inside resetTextFrame mainTF = " + mainTF);
            checkTextOver();

  • 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

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

  • 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

Maybe you are looking for

  • How to populate values into a Listbox on selection screen

    Hi All, Please any one let me know how to populate values (for ex.01,02 and 03) in a list box of selection screen.. Thanks, Vijay

  • Aperture + iPhoto for iOS resolution issues

    I'm trying to test out syncing some of my photos from Aperture 3.2.3 to iPhoto for iOS 1.0 (173) on an iPhone 4S in anticipation of getting my new iPad. Unfortunately, I'm running into problems. It seems no matter what I do, my images appear as 3.6MP

  • Recording midi with a keyboard using uno

    hi im using audition 3.0 and im using a midisport uno to record midi, ive got it to detect the notes when i play on my keyboard, but when i record in my midi track nothing records??? ofcourse i can record the visti manuely by pressing the virtal keyb

  • How to monitor SERVER performance

    hello, how to monitor the performance of the server,whether it is hit ratio is high or not can u please send the query regards

  • Transfer of No range interval  to production server

    Hi, Changed the existing number range interval for billing types  in development server.But the system didn't generate any change request number.Then how to transfer this to production server? Plz guide me what to do? Regards Subhasish