RTF - grouping of the two fields to display their unique total

Hello Experts,

I have a problem to create a rtf report, I tried to overcome last week. I can't combine two different columns and obtaining the sum of these combinations of unique columns. I hope someone can shed some light on how to on this subject.

My XML looks like this:

< ROW >
< CODE > 1 < CODE INFO > INFO
B < SEGMENT > < / SEGMENT >
< RECORD > 254 OUNT_ < / RECORD COUNT >
< / ROW >
< ROW >
< CODE > 1 < CODE INFO > INFO
B < SEGMENT > < / SEGMENT >
< RECORD > 300 OUNT_ < / RECORD COUNT >
< / ROW >
< ROW >
< CODE > 1 < CODE INFO > INFO
S < SEGMENT > < / SEGMENT >
< RECORD > 95 OUNT_ < / RECORD COUNT >
< / ROW >
< ROW >
< CODE > 2 < CODE INFO > INFO
B < SEGMENT > < / SEGMENT >
< RECORD > 745 OUNT_ < / RECORD COUNT >
< / ROW >
< ROW >
< CODE > 2 < CODE INFO > INFO
S < SEGMENT > < / SEGMENT >
< RECORD > 15 OUNT_ < / RECORD COUNT >
< / ROW >
< ROW >
< CODE > 2 < CODE INFO > INFO
S < SEGMENT > < / SEGMENT >
< RECORD > 85 OUNT_ < / RECORD COUNT >
< / ROW >

My desired outcome is to have a table that looks like this:

INFO CODE / SEGMENT / RECORD COUNT
1 / B / 554
1 / S / 95
2 / B / 745
2 / S / 100


I am able to regroup and get the correct record number when I just the INFO CODE and the NUMBER of RECORDS. However, I am having a lot of trouble when I add in the new SEGMENT field which can have several segments for each CODE of INFORMATION. Any help would be appreciated.

Thank you
The f

Use this:

Thank you
Bipuser

Tags: Business Intelligence

Similar Questions

  • That the two red bars displayed in an average of tab?

    That the two red bars displayed on an average tab?

    This is the icon of favorite for this site - http://www.hrdsoftwarellc.com/

  • In an Adobe form I need the value of Field3 to display the higher of the two fields, Field1 value or Field2 (compare the value of Field1 and Field2 and display the highest amount in field3) can someone please tell me the script to run this simple comparis

    I have 2 fields that are calculated fields and I need display the higher value of the 2 fields in a third field

    The field names must be in double - quotes. And if you change the value of any field, now, you will see error messages in the console.

  • Tweaking of default query so that the two fields are searched equally

    I have a 'Customer Details' data block that contains the field "mobile1" and "mobile2" for customer's cell phone numbers. When a customer enters into a mobile number or a field, I need to check the two mobile fields to see if this number exist as the primary contact number or secondary to any client of the query.
    I've tried to set a default_where clause, but oracle automatically adds to him whenever a number is entered in the field, making me a little trouble at the head!

    For example, if I say something like, WHERE MOB1 =: BLOCK. MOB1 OR = MOB1: BLOCK. Mob 2 (do not question true, just one example)
    And I took #-# in the field of mobile2,.
    Forms adds to this "AND mob 2 =: 1'"

    which causes the query to return nothing, since there is no entry mob 2 is equal to the registered number, even if there is an entry MOB1 bearing the same number.

    Is there a way to change the AND a RC for the query?

    If not, can anyone suggest how I can get the result, I'm looking for without having to change my block to a block not DB and duplicate me all the default features of Oracle Forms manually?

    Thanks in advance,

    A

    Do something like this in the PRE-QUERY-trigger:

    IF :BLOCK.MOBILE1 IS NOT NULL THEN
         SET_BLOCK_PROPERTY('BLOCK', ONETIME_WHERE, 'MOBILE1 LIKE ''' || :BLOCK.MOBILE1 ||  ''' OR ' ||
                                                    'MOBILE2 LIKE ''' || :BLOCK.MOBILE1 ||  '''');
    
    END IF;
    :BLOCK.MOBILE1:=NULL;
    
  • Receive error message when calculating the two fields with different date format

    I'm more familiar with SQL Server and Oracle, then after a search online without success, I ask here.

    I use developer PL/SQL with DB Oracle 11g Release 11.2.0.2.0 Enterprise 64-bit

    MyTable:

    ID_Number VarChar2

    Date of Date_Received

    Select ID_Number,

    Date_Received,

    To_Date (substr (ID_Number, 1.6), "YYMMDD") SentDate,.

    Date_Received - NumDays To_Date (substr (ID_Number, 1.6), "YYMMDD")

    FROM MyTable

    Where substr (ID_Number, 7.3) in ('ABC', 'ABD')

    and length (Trim (translate ((substr (ID_Number, 1,6)), '0123456789',' '))) a null value

    ID_Number Date_Received SentDate NumDays

    131002ABC1654106 10/16/10/2013-2013 14 2

    131004ABD8813899 4/12/2013-4/8/2013 4

    131014ABD1844832 10/16/10/14 OF 2013-2013 2

    Sometimes the first 6 characters in the ID_Number aren't the numbers and length (Trim (translate deletes records))

    I want just the records where NumDays > 2

    I tried to put the request in a subquery and using where NumDays > 2 outside.  I also tried using the calculation directly in the Where clause.  Without it in Where clause it works very well, with him in a place, I get the following error:

    ORA-01931: Date format picture ends before converting all of the input string


    I don't know how to put the two dates in the same format.  I tried to declare the format without result.  I don't understand how I can calculate in the selection, but do not use the same calculation in Where clause.

    Thank you for your help.

    Hello

    SQL is a language to describe the desired results.  How the system gets these results belongs to you don't have much say about which conditions will be applied when.

    One place where you can control the order of things is a CASE expression.  When you say

    CASE

    WHEN condition_1

    THEN expression_1

    END

    You can be sure that expression_1 will be evaluated only when cond_1 is set to TRUE.

    Try something like this:

    WITH got_sent_date AS

    (

    SELECT id_number, date_received

    CASE

    WHEN the TRANSLATION (SUBSTR (id_number, 1, 6)

    , 'x' 0123456789 '.

    , 'x'

    ) IS NULL

    THEN TO_DATE (SUBSTR (id_number, 1-6)

    , "YYMMDD".

    )

    END AS sent_date

    FROM MyTable

    WHERE (id_number, 7, 3) SUBSTR ("ABC", "ABD")

    )

    SELECT id_number

    date_received

    sent_date

    , date_received - sent_date AS num_days

    OF got_sent_date

    WHERE date_received > sent_date + 2

    ;

    If you would care to post some sample data (CREATE TABLE and INSERT statements) and the results desired from this data, I was able to test this.

    Of course, you'll still errors of execution if id_number starts with 6 digits, but they do not have to be valid, for example '131100' or '130229'.  This is one of the reasons why the date information storage in VARCHAR2 columns are a bad idea.  To work around this problem, see

    https://forums.Oracle.com/message/4255051

  • linking two fields and fill in the two field based on the list drop-down selection box 1

    I work for a small social service agency VERY small non-profit and I try to get our paperwork until the twentieth century. I hope someone here can help me. I have adobe acrobat, but not of other adobe products. I converted our word document that we use for client notes in fillable pdf format and so far everyone is excited to try it. I have a huge problem that I can't understand. I have a customer named created drop-down list box that contains a list of 300 customers. Box 2 is named customer ID and will contain a unique identification code assigned to each customer.

    For example:

    CUSTOMER ID customer JANE DOE 12345678

    So here is my question how can I ensure that when Unetelle is selected 12345678 is already filled in the second field?

    I fill the drop-down list with the names of customer and then enter the customer ID as the value of exports. Note You must have a unique name for each client.

    If your customer ID starts at zero, then you must use a custom JavaScript, so you can keep the zero non significant.

    For the customer ID field, you can use the following custom JavaScript code:

    Event.Value = this.getField("DropBoxFieldName').valueAsString;

    You will need to change DropBoxFieldName name of the drop-down list.

    You will need a mechanism for updating the new customer form and IDs names.

  • FormCalc - how to calculate the difference between the two fields datetime in hh: mm?

    Hello!

    I am building a form of time sheet in which I need to calculate the difference between the start and end times and present the result.

    I'm trying to do with FormCalc but if it is easier with JS is ok too.

    So that's what I did on the total field, by using the calculate on a NUMERIC field called decimalValue event:

    elapsed = Time2Num (endTime.formattedValue, "HH: mm")-Time2Num (startTime.formattedValue, "HH: mm")

    And then I tried to convert a time field:

    Total = decimalValue.rawValue;

    $.formattedValue = Num2Time (total, "HH: mm")

    Well, it doesn't work, it gives me crazy results in the datetime (total) field. If I type 09:00 and 09:30, the final result is... 22:30. Huh?

    Please, could someone help me understand how this thing works?

    Thanks a lot for the tips!

    Marcos

    Hi Marcos,

    Here are some examples:

    https://Acrobat.com/#d=kCPIgVkd09qrx6h-WRXxbQ

    https://Acrobat.com/#d=EsWqBMBt3sgEXnMSsK5pRA

    Hope that helps,

    Niall

  • get the date field to display the time

    I have a date field in my form. I want to capture the date and time, but it let me only on the date of entry.

    How can I change this?

    In the field property, in a property called Data Type , it will be the DATE on your side replace DATATIME and set the format DD-MON-YYYY HH24:MI:SS then try...

    BTW Hi ;)

    -Clément

  • test the two fields at once

    I have a form that updates patch_host and patch_hmc
    on a page... How can I add a check that tests
    if P56_patch_host IS NOT NULL or P56_hmc IS NOT NULL

    Seth,

    Create a type page-level validation exist and put it in the body:

    SELECT 1
      FROM DUAL
     WHERE :P56_patch_host IS NOT NULL
        OR :P56_hmc IS NOT NULL
    

    Good luck

    Janet Tyson

    Published by: Tyson Janet on April 10, 2009 10:51

  • Using groups of Windows Mail contacts without displaying the FIELD email addresses; and without having to use the BCC field?

    I want to see all the names of everyone in the group in the TO field: only the names of individuals in the Contact Group and NOT to display their individual addresses alongside their names; and I don't want to use the BCC field (because it will appear all the names). Is this possible?

    Unless you have included their address in a part of the field name, the addresses must disappears from view when sending. That said, all they need do is click on transfer, reply to all, or view the message source and they see all the addresses. That's why the BCC option was created. Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

  • Division of two fields in RTF?

    I try to divide the two fields in RTF, but he gave me concatination,
    I used the service devision, <? xdolst: a B div? > and <? xdofx:2 / 3? >
    any help please.

    Thank you

    Published by: 947014 on July 17, 2012 06:03

    Why?
    >



    >

    >
    I also tried the below, and it give blanck!
    >
    or empty course

    According to your xml file
    You need

    
    

    without

    I tried

    
    
    
    

    and it's work

    Published by: Alexandr on 18 July 2012 01:42

  • diference between two fields of two groups

    Hello


    'Data model' I have two groups with a data link between them. In 'layout model' (report 6) I have to show the difference between the two fields (one from each group). I tried with the formula column, but when I run the report I get the REP-1517 + column "XXXl" made reference to the "YYY" column, which has an incompatible frequency.

    Thank you for your help.

    This should work if the formula column is placed in the group in 'detail '. The other way, it won't work, and it makes sense because for each record in the master group there may be multiple records in the detail group, so, how if reports decides which of the records on the details to use in the formula column.

  • Sequence of fields to display in the order

    How can I add the "Requirements" field to display in my window in the sequence editor teststand next to each other as step Description, Action Post, Setings...?

    Thank you Sir!

  • combines the two text fields

    Hello, I've created a form with Adobe pro XI. I want to create a text field that combines the two fields (Field1 and Field2) text. How can I do?

    If the third field does not need to be editable, you can use a calculation script customized to what is something like the following:

    Custom calculation script

    (function () {}

    Get the field values as strings

    var s1 = getField("Text1").valueAsString;

    var S2 = getField("Text2").valueAsString;

    Set the value of this field to the concatenation of two strings

    Event.Value = s1 + s2;

    })();

  • Returns the lowest value of two fields

    Hello

    I have two domains that users manually enter in a form.  Value1 and Value2.

    Someone at - it suggestions on the best way to use JavaScript to return the lowest value of the two fields?

    Thank you

    Natalie

    I think I misunderstood what you mean by any, I thought you wanted the calculated value to be None. The two fields value digital formats and modify the script for:

    Custom calculate script

    (function () {}

    Initialize the array

    aNums var = [];

    Get the field values as strings

    var s1 = getField("Value1").valueAsString;

    var S2 = getField("Value2").valueAsString;

    Convert values to numbers if not empty and add to the table

    If aNums.push(+s1) (s1);

    If aNums.push(+s2) (s2);

    Set the value of this lesser field of entries

    If both are blank, this field blank

    Event.Value = aNums.length? Math.min.Apply (null, aNums);:

    })();

Maybe you are looking for

  • Workstation HP Z620: Z620 controller SAS Windows10

    I just updated my OS to Win7 Pro Win10 Pro. I checked the equipment in System Info and I saw that the SAS has nomore controller a good pilot installed to work. In the support page, I have not found a new version of the SAS for Win10 drivers... How ca

  • Configuring sound card not open?

    Hello I'm working on the tutorial of 3 h of the NC and accessed at page 50 of the dokumnet. Exercise 3.2. Alternative C. Anyone know how I can find the reason of the problem and the solution, see the following error message: error 4803 bei Audioaufna

  • HP 2420 printer: ink level

    How do I check my ink level or thunder to my HP 2420 to win 8.1 x 64? Sincere friendships; Nguema

  • I have a Windows Live ID account and was subscribed to MSN Premium, but now I'm not, is Hotmail free to use even with my (old) MSN and password?

    I'm no longer a "Subscriber" of MSN Premium as of June 30, 2011 by Qwest/century link and simply use their basic browser and e-mail, but wonder if I'm supposed to pay to use the Windows Live/Hotmail mail service? If so, I will be leaving going on the

  • Small Business VPN

    The ultimate goal is to be able to access my intranet in my small business from a remote location. When I'm at the store, I can access the network through 'My computer' and see my network printer and files stored on the server. I want to be able to a