Hide Advance table Depending upon the value of dropDown

Hi,
I have 2 advance tables. 1st one has a DropDown. Depending upon the value of the dropdown in 1st advance table, the second advanced table should get rendered.
I tried by getting the value of the dropdown by addingg a PPF and iterating trough the table and I got the value. But when I redirect to the same page, all the selection and other values in 1st advanced table vanish out.
Can someone help me getting the 2nd table hidden and at the same time retaining the values for the 1st advanced table.
Thanks in Advance,
Kaushik Rambhiya

Kaushik
Implement PPR for this requirement and dont redirect the page
Displaying image based selected value of choice bean
http://oracleanil.blogspot.com/2009/05/ppr.html
Thanks
AJ

Similar Messages

  • Shading part of a JTable Cell dependent upon the value of the cell

    Hi
    Was hoping some one woudl be able to provide some help with this. I'm trying to create a renderer that will "shade" part of a JTable cell's background depending upon the value in the cell as a percentage (E.g. if the cell contains 0.25 then a quarter of the cell background will be shaded)
    What I've got so far is a renderer which will draw a rectangle whose width is the relevant percentage of the cell's width. (i.e. the width of the column) based on something similar I found in the forum but the part I'm struggling with is getting it to draw this rectangle in any cell other than the first cell. I've tried using .getCellRect(...) to get the x and y position of the cell to draw the rectangle but I still can't make it work.
    The code for my renderer as it stands is:
    import java.awt.Component;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import javax.swing.JLabel;
    import javax.swing.JTable;
    import javax.swing.table.TableCellRenderer;
    public class PercentageRepresentationRenderer extends JLabel implements TableCellRenderer{
         double percentageValue;
         double rectWidth;
         double rectHeight;
         JTable table;
         int row;
         int column;
         int x;
         int y;
         public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
              if (value instanceof Number)
                   this.table = table;
                   this.row = row;
                   this.column = column;
                   Number numValue = (Number)value;
                   percentageValue = numValue.doubleValue();
                   rectHeight = table.getRowHeight(row);
                   rectWidth = percentageValue * table.getColumnModel().getColumn(column).getWidth();
              return this;
         public void paintComponent(Graphics g) {
            x = table.getCellRect(row, column, false).x;
            y = table.getCellRect(row, column, false).y;
              setOpaque(false);
            Graphics2D g2d = (Graphics2D)g;
            g2d.fillRect(x,y, new Double(rectWidth).intValue(), new Double(rectHeight).intValue());
            super.paintComponent(g);
    }and the following code produces a runnable example:
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.DefaultTableModel;
    public class PercentageTestTable extends JFrame {
         public PercentageTestTable()
              Object[] columnNames = new Object[]{"A","B"};
              Object[][] tableData = new Object[][]{{0.25,0.5},{0.75,1.0}};
              DefaultTableModel testModel = new DefaultTableModel(tableData,columnNames);
              JTable test = new JTable(testModel);
              test.setDefaultRenderer(Object.class, new PercentageRepresentationRenderer());
              JScrollPane scroll = new JScrollPane();
              scroll.getViewport().add(test);
              add(scroll);
         public static void main(String[] args)
              PercentageTestTable testTable = new PercentageTestTable();
              testTable.pack();
              testTable.setVisible(true);
              testTable.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }If anyone could help or point me in the right direction, I'd appreciate it.
    Ruanae

    This is an example I published some while ago -
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class Fred120 extends JPanel
        static final Object[][] tableData =
            {1, new Double(10.0)},
            {2, new Double(20.0)},
            {3, new Double(50.0)},
            {4, new Double(10.0)},
            {5, new Double(95.0)},
            {6, new Double(60.0)},
        static final Object[] headers =
            "One",
            "Two",
        public Fred120() throws Exception
            super(new BorderLayout());
            final DefaultTableModel model = new DefaultTableModel(tableData, headers);
            final JTable table = new JTable(model);
            table.getColumnModel().getColumn(1).setCellRenderer( new LocalCellRenderer(120.0));
            add(table);
            add(table.getTableHeader(), BorderLayout.NORTH);
        public class LocalCellRenderer extends DefaultTableCellRenderer
            private double v = 0.0;
            private double maxV;
            private final JPanel renderer = new JPanel(new GridLayout(1,0))
                public void paintComponent(Graphics g)
                    super.paintComponent(g);
                    g.setColor(Color.CYAN);
                    int w = (int)(getWidth() * v / maxV + 0.5);
                    int h = getHeight();
                    g.fillRect(0, 0, w, h);
                    g.drawRect(0, 0, w, h);
            private LocalCellRenderer(double maxV)
                this.maxV = maxV;
                renderer.add(this);
                renderer.setOpaque(true);
                renderer.setBackground(Color.YELLOW);
                renderer.setBorder(null);
                setOpaque(false);
                setHorizontalAlignment(JLabel.CENTER);
            public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col)
                final JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);
                if (value instanceof Double)
                    v = ((Double)value).doubleValue();
                return renderer;
        public static void main(String[] args) throws Exception
            final JFrame frame = new JFrame("Fred120");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setContentPane(new Fred120());
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
    }

  • Get Row reference in advanced table to set the value of custom column

    Hi,
    I have a requirement to add a new column PHP Amount in Manage Charge page which is a entry page where all the charges are entered for a PO. This region is based on Advanced table.
    As per requirement, Newly created column should populate the value of the existing column (Amount) or vice verse i.e. value entered in amount column should be set to PHP Amount column for a particular row. and the value entered in PHP amount should be stored in the custom table.
    I have added the column via personalization and setting the view attribute in extended controller as this column is not the part of the database table on which the VO is based upon. Also added a  PPR event in process request function in controller. And getting the reference of the row in processForm Request's PPR event and invoking the method defined in my custom AM for getting and setting the columns values . Here i can't extend the root AM as the Page have LOV columns so i have created my custom AM and adding it dynamically in controller.
    Here is the complete code
    Controller Code
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
               super.processRequest(oapagecontext, oawebbean);
               OAApplicationModule rootAm = oapagecontext.getApplicationModule(oawebbean);  
                OAApplicationModule nam = (OAApplicationModule)rootAm.findApplicationModule("XXIPCShipmentAMEx");
                 if (nam == null)
                     nam = (OAApplicationModule)rootAm.createApplicationModule("XXIPCShipmentAMEx", "xxipc.oracle.apps.inl.workbench.server.XXIPCShipmentAMEx");
               OAAdvancedTableBean tableBean =(OAAdvancedTableBean)oawebbean.findIndexedChildRecursive("ChargeLinesAdvTable");
               OAMessageTextInputBean phpAmt =(OAMessageTextInputBean)tableBean.findIndexedChildRecursive("XXIPC_PHP_AMOUNT");
               OAViewObject ChargeLinesVO1 = (OAViewObject)rootAm.findViewObject("ChargeLinesVO1");
                phpAmt.setViewUsageName("ChargeLinesVO1");
                if (ChargeLinesVO1 != null)
                    try
                      String l_att= ChargeLinesVO1.findAttributeDef("PHPAmt").toString();
                     catch(Exception exception)
                      ChargeLinesVO1.addDynamicAttribute("PHPAmt"); //Adding ViewAttribute to VO
                ChargeLinesVO1.reset();
                phpAmt.setViewAttributeName("PHPAmt");
               FirePartialAction FireActionA = new oracle.cabo.ui.action.FirePartialAction();
               FireActionA.setEvent("PPR");
               FireActionA.setUnvalidated(false);
               phpAmt.setPrimaryClientAction(FireActionA);
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
                super.processFormRequest(oapagecontext, oawebbean);
                OAApplicationModule rootAm = oapagecontext.getApplicationModule(oawebbean);
                OAApplicationModule nam = (OAApplicationModule)rootAm.findApplicationModule("XXIPCShipmentAMEx");
                OAAdvancedTableBean tableBean =(OAAdvancedTableBean)oawebbean.findIndexedChildRecursive("ChargeLinesAdvTable");
                OAMessageTextInputBean Amt =(OAMessageTextInputBean)tableBean.findIndexedChildRecursive("Amount");
                OAViewObject ChargeLinesVO1 = (OAViewObject)rootAm.findViewObject("ChargeLinesVO1");
                String rowRef = oapagecontext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
                Serializable[] param ={rowRef};
              // IF PPR event bind with PHPAmount column is triggered
                if("PPR".equals(oapagecontext.getParameter("event")))
                        nam.invokeMethod("PHPAmtPPRAction",param);
              // IF changeChargeAmt event(Standard Event ) bind with Amount column is triggered
               if("changeChargeAmt".equals(oapagecontext.getParameter("event")))
                  nam.invokeMethod("changeChargeAmtPPRAction",param);
    Custom AM Code
    public void PHPAmtPPRAction(String rowRef)
              OARow row = null;
              if (rowRef != null )
                   row=(OARow)findRowByRef(rowRef);
                   if(row != null)
                      Number phpAmt =(Number)row.getAttribute("PHPAmt");
                       if(phpAmt != null)
                              row.setAttribute("ChargeAmt", phpAmt);
      public void changeChargeAmtPPRAction(String rowRef)
            OARow row = null;          
              if (rowRef != null )      
                 row=(OARow)findRowByRef(rowRef);
                 if(row != null)
                     Number chargeAmt =(Number)row.getAttribute("ChargeAmt");                  
                     if(chargeAmt != null)                  
                             row.setAttribute("PHPAmt", chargeAmt );
    I m not able to set the PHP Amount column value entered in Amount column. But i am able to set the Amount column value to PHP amount column.
    I m not getting the Row Reference in case PPR event triggered in PHP Amount column . It is giving Null reference in case of PHP Amount.
    I don't know what i m missing ..Can anyone help me here..
    Thanks in advance
    Renu

    but using second way you will not be able to save those record in database, to save in database you have to override setter method also
    Code will be like this -
        public String getBillRemarks() {
           return getSuppNmTrans(); // This is first Column Value
           // return (String) getAttributeInternal(BILLREMARKS);    }
        public void setBillRemarks(String value) {
           //Setting First Column Value in Second
           setAttributeInternal(BILLREMARKS, getSuppNmTrans());  
    But i suggest you to use valueChangeListener on first field to set value in second one
    Ashish

  • Can we hide column in a query depending upon the variable selected

    Hi all,
    let us say my report have 10 column.
    now i am giving user option to select the values (let us say 'a' or 'b')
    columns must be displayed depending upon the value selected by user ..
    for example if user has selected 'a' then first five columns should be displayed..and if user has selected 'b' last five column should be displayed..(it will be OK even if we can hide the columns depending upon the selection )
    Is it possible in BEx...please let me know

    I did it sometime back. A bit complicated process.
    Create an infoobject, manually enter the values "keyfig1" and "keyfig2".
    Include this infoobject in the filters and restrict it using a "ready for input" variable.
    Now create two formula variables.
    Write a customer exit such that when you select "keyfig1", first formula variable's value should be set to 1 and other one's to 0.
    Then in the query create two calculated key figures, multiply both with the formula variable. Also supress column (all active value == 0).
    Then it will show the key figure which you have selected.
    Pravender

  • JOIN ON 2 different sets of table depending on the result of first set

    <br>
    I have a query where it returns results. I want to join this query to
    2 different sets of table depending upon the first set has a result or not.
    if first set didnt had a results or records then check for the second set.
    SELECT 
    peo.email_address,
    r.segment1 requistion_num,
    to_char(l.line_num) line_num,
    v.vendor_name supplier, 
    p.CONCATENATED_SEGMENTS category,
    to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
    TO_CHAR(l.need_by_date,'MM/DD/YYYY') need_by_date,
    pe.full_name requestor,
    l.item_description,
    pr.segment1 project_num,
    t.task_number,
    c.segment1,
    c.segment2
    FROM po_requisition_headers_all r,
         po_requisition_lines_all l,  
    (SELECT project_id,task_id,code_combination_id, distribution_id,requisition_line_id,creation_date  FROM
    (SELECT project_id,task_id,code_combination_id,distribution_id,creation_date,requisition_line_id,ROW_NUMBER ()
    OVER (PARTITION BY requisition_line_id ORDER BY requisition_line_id,distribution_id ) rn
    FROM po_req_distributions_all pod) WHERE rn = 1) d,
    gl_code_combinations c,
    POR_CATEGORY_LOV_V p,
    per_people_v7 pe,
    PA_PROJECTS_ALL pr,
    PA_TASKS_ALL_V t,
    ap_vendors_v v,
    WHERE  d.creation_date >= nvl(to_date(:DATE_LAST_CHECKED,
    'DD-MON-YYYY HH24:MI:SS'),SYSDATE-1)
    AND
    l.requisition_header_id = r.requisition_header_id
    AND l.requisition_line_id = d.requisition_line_id
    AND d.code_combination_id = c.code_combination_id
    AND r.APPS_SOURCE_CODE = 'POR'
    AND l.category_id = p.category_id
    AND r.authorization_status IN ('IN PROCESS','PRE-APPROVED','APPROVED')
    AND l.to_person_id = pe.person_id
    AND pr.project_id(+) = d.project_id
    AND t.project_id(+) = d.project_id
    AND t.task_id(+) = d.task_id
    AND v.vendor_id(+) = l.vendor_id
    and r.requisition_header_id in(
    SELECT requisition_header_id FROM po_requisition_lines_all pl                    
    GROUP BY requisition_header_id HAVING SUM(nvl(pl.quantity,0) * nvl(pl.unit_price, 0)) >=100000)
    group by
    peo.email_address,
    r.REQUISITION_HEADER_ID,
    r.segment1 ,
    to_char(l.line_num) ,
    v.vendor_name, 
    p.CONCATENATED_SEGMENTS ,
    to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
    TO_CHAR(l.need_by_date,'MM/DD/YYYY') ,
    pe.full_name ,
    l.item_description,
    c.segment1,
    c.segment2,
    pr.segment1 ,
    t.task_number
    <b>I want to join this query with this first set </b>
    SELECT b.NAME, c.segment1 CO, c.segment2 CC,
              a.org_information2 Commodity_mgr,
              b.organization_id, p.email_address
         FROM hr_organization_information a, hr_all_organization_units b, pay_cost_allocation_keyflex c, per_people_v7 p
        WHERE a.org_information_context = 'Financial Approver Information'
          AND a.organization_id = b.organization_id
           AND b.COST_ALLOCATION_KEYFLEX_ID = c.COST_ALLOCATION_KEYFLEX_ID
           and a.ORG_INFORMATION2 = p.person_id
          AND NVL (b.date_to, SYSDATE + 1) >= SYSDATE
          AND b.date_from <= SYSDATE;
    <b>if this doesnt return any result then i need to join the query with the 2nd set</b>
    select lookup_code, meaning, v.attribute1 company, v.attribute2 cc,
                decode(v.attribute3,null,null,p1.employee_number || '-' || p1.full_name) sbu_controller,
                decode(v.attribute4,null,null,p2.employee_number || '-' || p2.full_name) commodity_mgr
                from fnd_lookup_values_vl v,
                per_people_v7 p1, per_people_v7 p2
                where lookup_type = 'BIO_FIN_APPROVER_INFO'
                  and v.attribute3 = p1.person_id(+)
                and v.attribute4 = p2.person_id(+)
                order by lookup_code
    How do i do it?
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    <br>
    I have hard coded the 2 jon sets into one using UNION ALL but if one record exists in both sets how would i diferentiate between the 2 sets.
    COUNT(*) will only give the total records.
    if there r total 14
    suppose first set gives 12 records
    second set gives 4 records.
    But i want only 14 records which could 12 from set 1 and 2 from set 2 since set1  and set2 can have common records.
    SELECT 
    peo.email_address,
    r.segment1 requistion_num,
    to_char(l.line_num) line_num,
    v.vendor_name supplier, 
    p.CONCATENATED_SEGMENTS category,
    to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
    TO_CHAR(l.need_by_date,'MM/DD/YYYY') need_by_date,
    pe.full_name requestor,
    l.item_description,
    pr.segment1 project_num,
    t.task_number,
    c.segment1,
    c.segment2
    FROM po_requisition_headers_all r,
         po_requisition_lines_all l,  
    (SELECT project_id,task_id,code_combination_id, distribution_id,requisition_line_id,creation_date  FROM
    (SELECT project_id,task_id,code_combination_id,distribution_id,creation_date,requisition_line_id,ROW_NUMBER ()
    OVER (PARTITION BY requisition_line_id ORDER BY requisition_line_id,distribution_id ) rn
    FROM po_req_distributions_all pod) WHERE rn = 1) d,
    gl_code_combinations c,
    POR_CATEGORY_LOV_V p,
    per_people_v7 pe,
    PA_PROJECTS_ALL pr,
    PA_TASKS_ALL_V t,
    ap_vendors_v v,
    WHERE  d.creation_date >= nvl(to_date(:DATE_LAST_CHECKED,
    'DD-MON-YYYY HH24:MI:SS'),SYSDATE-1)
    AND
    l.requisition_header_id = r.requisition_header_id
    AND l.requisition_line_id = d.requisition_line_id
    AND d.code_combination_id = c.code_combination_id
    AND r.APPS_SOURCE_CODE = 'POR'
    AND l.category_id = p.category_id
    AND r.authorization_status IN ('IN PROCESS','PRE-APPROVED','APPROVED')
    AND l.to_person_id = pe.person_id
    AND pr.project_id(+) = d.project_id
    AND t.project_id(+) = d.project_id
    AND t.task_id(+) = d.task_id
    AND v.vendor_id(+) = l.vendor_id
    and r.requisition_header_id in(
    SELECT requisition_header_id FROM po_requisition_lines_all pl                    
    GROUP BY requisition_header_id HAVING SUM(nvl(pl.quantity,0) * nvl(pl.unit_price, 0)) >=100000)
    group by
    peo.email_address,
    r.REQUISITION_HEADER_ID,
    r.segment1 ,
    to_char(l.line_num) ,
    v.vendor_name, 
    p.CONCATENATED_SEGMENTS ,
    to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
    TO_CHAR(l.need_by_date,'MM/DD/YYYY') ,
    pe.full_name ,
    l.item_description,
    c.segment1,
    c.segment2,
    pr.segment1 ,
    t.task_number
    UNION ALL
    SELECT 
    r.segment1 requistion_num,
    to_char(l.line_num) line_num,
    v.vendor_name supplier, 
    p.CONCATENATED_SEGMENTS category,
    to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
    TO_CHAR(l.need_by_date,'MM/DD/YYYY') need_by_date,
    pe.full_name requestor,
    l.item_description,
    pr.segment1 project_num,
    t.task_number,
    c.segment1,
    c.segment2
    FROM po_requisition_headers_all r,
         po_requisition_lines_all l,  
    (SELECT project_id,task_id,code_combination_id, distribution_id,requisition_line_id,creation_date  FROM
    (SELECT project_id,task_id,code_combination_id,distribution_id,creation_date,requisition_line_id,ROW_NUMBER ()
    OVER (PARTITION BY requisition_line_id ORDER BY requisition_line_id,distribution_id ) rn
    FROM po_req_distributions_all pod) WHERE rn = 1) d,
    gl_code_combinations c,
    POR_CATEGORY_LOV_V p,
    per_people_v7 pe,
    PA_PROJECTS_ALL pr,
    PA_TASKS_ALL_V t,
    ap_vendors_v v,
    fnd_lookup_values_vl flv,
    per_people_v7 p1,
    per_people_v7 p2
    WHERE  d.creation_date >= nvl(to_date('11-APR-2008',
    'DD-MON-YYYY HH24:MI:SS'),SYSDATE-1)
    AND
    l.requisition_header_id = r.requisition_header_id
    AND l.requisition_line_id = d.requisition_line_id
    AND d.code_combination_id = c.code_combination_id
    AND r.APPS_SOURCE_CODE = 'POR'
    AND l.org_id = 141
    AND l.category_id = p.category_id
    AND r.authorization_status IN ('IN PROCESS','PRE-APPROVED','APPROVED')
    AND l.to_person_id = pe.person_id
    AND pr.project_id(+) = d.project_id
    AND t.project_id(+) = d.project_id
    AND t.task_id(+) = d.task_id
    AND v.vendor_id(+) = l.vendor_id
    AND flv.attribute1=c.segment1
    AND flv.attribute2=c.segment2
    AND flv.lookup_type = 'BIO_FIN_APPROVER_INFO'
    and flv.attribute3 = p1.person_id(+)
    and flv.attribute4 = p2.person_id(+)
    and r.requisition_header_id in(
    SELECT requisition_header_id FROM po_requisition_lines_all pl                    
    GROUP BY requisition_header_id HAVING SUM(nvl(pl.quantity,0) * nvl(pl.unit_price, 0)) >=100000)
    group by
    r.REQUISITION_HEADER_ID,
    r.segment1 ,
    to_char(l.line_num) ,
    v.vendor_name, 
    p.CONCATENATED_SEGMENTS ,
    to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
    TO_CHAR(l.need_by_date,'MM/DD/YYYY') ,
    pe.full_name ,
    l.item_description,
    c.segment1,
    c.segment2,
    pr.segment1 ,
    t.task_number

  • Need help in hiding particular column of a table depending upon value

    Hi experts,
    I have developed a custom smartform and Print program.
    My problem is ..depending upon the data i recieve,...i have to hide a particular column.
    For example ... i have a table with 2 rows...one header and main row..This table has 3 column.
    I have to hide one of the column depending upon the data i recieve. So my output should have 2 rows and 2 columns.
    Please help.

    well vishwa u r right it wont work for multiple columns,
    then i guess this shud work.
    @thendral
    U can try like this create the rows with single column
    then print all ur text elements with spaces inserted manually between them with text editor then in conditions tab of the text elements specify ur condition according to what all u want to print.
    кu03B1ятu03B9к

  • From which table we can get cat_guid depending upon the guid of a tr.ticket

    Hi Experts,
    I have to find the cat_guid depending upon the guid which is in crmd_orderadm_h table to retrive the fields categeorization module/element/type maintained in the service ticket.
    Please tell me from which table we can get cat_guid depending upon the guid of perticular trouble ticket.
    points will be rewarded if helpful.
    regards,
    Ezal

    Hi Ezal
    Pass the GUID (CRMD_ORDERADM_H) to Function Module CRM_ORDER_READ to retrieve the required values.
    I think this should do the trick.
    Reward with points if helpful
    Regards
    Arden

  • How to create  some columns dynamically in the report designer depending upon the input selection

    Post Author: ekta
    CA Forum: Crystal Reports
    how  to create  some columns dynamically in the report designer depending upon the input selection 
    how  export  this dynamic  report in (pdf , xls,doc and rtf format)
    report format is as below:
    Element Codes
    1
    16
    14
    11
    19
    10
    2
    3
    Employee nos.
    Employee Name
    Normal
    RDO
    WC
    Breveavement
    LWOP
    Sick
    Carers leave
    AL
    O/T 1.5
    O/T 2.0
    Total Hours
    000004
    PHAN , Hanh Huynh
    68.40
    7.60
    76.00
    000010
    I , Jungue
    68.40
    7.60
    2.00
    5.00
    76.00
    000022
    GARFINKEL , Hersch
    66.30
    7.60
    2.10
    76.00
    In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
    if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
    Can anybody help me how do I design such report....
    Thanks

    Hi Developer life,
    According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
    As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric  values) in the details,  add  an filter to filter the data base on this column group, but if
    the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
    If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings 
    If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
    Any question, please feel free to let me know.
    Best Regards
    Vicky Liu

  • Column displaying as an icon instead of/depending on the value

    Hello,
    I use interactive reports and I've a column (IND_CAMP) that can take 2 values : 0 or 1 (the type of the column is "Number").
    I would like this column displays as an icon, depending on the value (a check box, checked or not).
    Must I change my table or can I do this directly in Apex, for example with the conditional display ?
    Or can I add a column, with a different type, connected to IND_CAMP in my query ?
    thanks for your ideas,
    Fanny

    Hi MDK, thanks for your help,
    I'm sorry but I'm new with Apex and PL/SQL...
    My "checkbox" is in fact only a picture, so I've 2 icons, for example icon1.gif and icon2.gif
    And the value I'm interested in is the value of IND_CAMP (0 or 1).
    Should my query look like this...? :
    SELECT MYTABLE.CDE_CAMP,
    MYTABLE.IND_CAMP
    FROM MYTABLE
    CASE
    IND_CAMP.value WHEN 0
    THEN
    '<img src="#WORKSPACE_IMAGES#icon1.gif" />'
    ELSE
    '<img src="#WORKSPACE_IMAGES#icon2.gif" />'
    ENDI can add a column with the icon and hide the IND_CAMP or I can replace it.
    thanks again,
    Fanny

  • How to fill up the Flex ProgressBar control ,depending upon the Controls Seelcted inside the MXML

    Hi ,
    Please , let me know  How to fill up the Flex ProgressBar control ,depending upon the Controls Seelcted inside the MXML 
    Lets say I have five text boxes and a dropdown box in my flex application, how can I make the progress bar fill up when there is text in each box, and the dropdown selected. 
    Please help
    Thanks in advance .

    Hi Kiran,
    You can do something like below to implement the functionlaity you needed...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top"
        horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0" viewSourceURL="srcview/index.html">
        <mx:Script>
            <![CDATA[
              private var j:uint=0;
              // Event handler function to set the value of the
              // ProgressBar control.
              private function runit():void
                  if(j<=100)
                    j+=10;
                     bar.setProgress(j,100);
                     bar.label= "CurrentProgress" + " " + j + "%";
                  if(j>100)
                     j=0;
                     check1.selected=false;
                     bar.setProgress(j,100);
                     bar.label= "CurrentProgress" + " " + j + "%";
              private function checkFunction():void
               if(!check1.selected)
                 if(j<=100)
                    j-=10;
                     bar.setProgress(j,100);
                     bar.label= "CurrentProgress" + " " + j + "%";                
                  if(j>100)
                     j=0;
                     check1.selected=false;
                     bar.setProgress(j,100);
                     bar.label= "CurrentProgress" + " " + j + "%";
                else
               runit();
            ]]>   
        </mx:Script>
        <mx:Panel title="ProgressBar Control" layout="vertical" color="0xffffff" borderAlpha="0.15"
             paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center">
             <mx:Label width="100%" color="0x323232"
                text="Click the button to increment the progress bar." />
                <mx:HBox>
              <mx:CheckBox id="check1" label="Check Me" color="#123456" click="checkFunction();"/> 
            <mx:Button id="Speed" label="Click" click="runit();" color="0x323232"/>
              </mx:HBox>
            <mx:ProgressBar id="bar" labelPlacement="bottom" themeColor="#EE1122" minimum="0" visible="true" maximum="100"
                 color="0x323232"    label="CurrentProgress 0%" direction="right" mode="manual" width="100%"/>
        </mx:Panel>
    </mx:Application>
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Calculate a measure depending on the value of other dimension

    HI,
    I would like to know if it’s possible to calculate a measure depending on the value of other dimension. I want to calculate this measure in the Business Model and Mapping. I show you how I am trying to do it:
    http://img338.imageshack.us/img338/2496/imagenjp.png
    But when I try to make an aggregation of this measure then I get an error of consistency.
    I think a good example to make you to understand me is the function TODATE which calculates an aggregation depending on one time dimension. I would like to do the same thing but regarding to the value of other dimension.
    Can someone help me? Thanks a lot.

    Hi,
    Do you have that dimension table as a "Sources" in that BMM folder? if yes, then you can use the "Data Type" option and click on "show all logical sources". Then click on your fact table using which you want to do the calculation and then use this formula. After that you can have the aggregation.
    It should work.
    Thanks,
    Rohit

  • Add button on seeded Advanced Table, to catch the person_id to generate xml report

    Hi All,
    We are having a requirement to generate pdf report from seeded page.
    And we kind a hit dead end. So was really looking for any inputs or insights.
    We personalized page to add a column with a button in it. We used javascript
    in destination URI to catch the event in PFR.
    javascript:submitForm('DefaultFormName',1,{'xxdbPrintPDF':'YES'});
    All is good until this point. But the EVEN_SOURCE_ROW_REFERENCE is showing as null, when we hit that
    personalized button on page. Where as it is giving right values if clicked on other seeded items in table.
    And each row has a distinct person_id. We need handle to person_id to generate that person specific report.
    Any thoughts would be greatly appreciated.
    Thanks
    Hari

    Forgot to mention earlier. Vacancy page has advanced table listing all the applicants applied.
    We need button across each applicant(i.e in each row). And when we hit that button, if we can get person_id.
    We can use that in whereclauseparams() to get specific rows for xml report.
    Tried to create button programmatically, and still not able to retrieve row number/person id
    PR code
        public void processRequest(OAPageContext oapagecontext,
                                   OAWebBean oawebbean) {
            super.processRequest(oapagecontext, oawebbean);
            OAAdvancedTableBean unUsedCCTxnsTable =
                (OAAdvancedTableBean)oawebbean.findIndexedChildRecursive("ApplicantQueryRegion");
            if (unUsedCCTxnsTable !=
                null) //If not able to find the table, skip the process
                //Create new column Category to the table
                OAColumnBean categoryCol =
                    (OAColumnBean)createWebBean(oapagecontext, COLUMN_BEAN, null,
                                                "XxcfiCategoryColumn1");
                OASortableHeaderBean column1Header =
                    (OASortableHeaderBean)createWebBean(oapagecontext,
                                                        SORTABLE_HEADER_BEAN, null,
                                                        "XxcfiCategoryColumn1Header1");
                column1Header.setText("Category");
                categoryCol.setColumnHeader(column1Header);
                // Create the actual leaf item under the first column
                OAMessageStyledTextBean leaf1 =
                    (OAMessageStyledTextBean)createWebBean(oapagecontext,
                                                           MESSAGE_STYLED_TEXT_BEAN,
                                                           null,
                                                           "XxcfiCategoryColumnLeaf1");
                leaf1.setViewAttributeName("AplPersonId");
                categoryCol.addIndexedChild(leaf1);
                unUsedCCTxnsTable.addIndexedChild(categoryCol);
                //add submitbutton
                 //Create new column Category to the table
                 OAColumnBean categoryCol1 =
                     (OAColumnBean)createWebBean(oapagecontext, COLUMN_BEAN, null,
                                                 "XxcfiCategoryColumn2");
                 OASortableHeaderBean column1Header1 =
                     (OASortableHeaderBean)createWebBean(oapagecontext,
                                                         SORTABLE_HEADER_BEAN, null,
                                                         "XxcfiCategoryColumn1Header2");
                 column1Header.setText("PDF");
                 categoryCol.setColumnHeader(column1Header);
                OASubmitButtonBean submitButton =(OASubmitButtonBean)createWebBean(oapagecontext,
                OAWebBeanConstants.BUTTON_SUBMIT_BEAN, null, "submitButton");
                submitButton.setViewAttributeName("AplPersonId");
                unUsedCCTxnsTable.addIndexedChild(submitButton );
    PFR code
        public void processFormRequest(OAPageContext pageContext,
                                       OAWebBean webBean) {
            OAApplicationModule appModule =
                pageContext.getApplicationModule(webBean);
            OAViewObject vo =
                (OAViewObject)appModule.findViewObject("ApplicantListVO");
            oracle.jbo.domain.Number num = null;
            if (vo != null) {
                OARow row = (OARow)vo.getCurrentRow();
                if (row != null) {
                    num =
    (oracle.jbo.domain.Number)row.getAttribute("AplPersonId");
            throw new OAException("Button Clicked by HM " + num.toString() +
                                  "-----" +
                                  pageContext.getParameter("XxcfiCategoryColumnLeaf1") +
                                  "-----" +
                                  pageContext.getParameter("submitButton") +
                                  "-----" +
                                  (String)pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE),
                                  OAException.ERROR);
    Any ideas will be of great help
    Thanks

  • Do the execution time of the insert command depend upon the no the indexes

    hi,
    Do the execution time of the insert,update and delete command depend upon the no the indexes created for a table......
    Edited by: [email protected] on Mar 4, 2009 3:02 AM

    sure,..
    An index is a structure which contains entries pointing to the actual data in the table.
    When you insert a record into a table, the data which should also be indexed is inserted in the index structure. This index data needs to be in a specific place, not just anywhere (as opposed to e.g. a heap table).
    So this might lead to an update and insert in the index structure.
    This is just to give you an idea. More on the subject in Tom Kyte's Expert Oracle Database Architecture and of course Oracle's documentation.

  • Create multiple capture processes for same table depending on column value

    Hi,
    is it possible to create multiple realtime downstream capture processes to capture changes for the same table depending on column value?
    Prakash

    i found it - by using subset rules
    prakash

  • How to Visible/Hide an Item based on the value of another Item

    Hi
    I need to visible and hide a textitem based on the value of another item.This form has 3 blocks, and the both item is in the first Master Block.
    My code is:
    if :RECORDTYPE=7 then
         Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_TRUE);
         Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_TRUE);
    ELSE
         Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_FALSE);
    Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_FALSE);
    :BLOCK.ITEM:=NULL;
    end if;     
    I wrote the code in the Validate Trigger, but not working when moving Next Record & Previous Record
    Thanks in advance
    Rizly

    Read the 'Propagation of Property Changes' section towards the end of the page for Set_Item_Property in the online help. I'm not sure what you mean by locking automatically but perhaps it's because of this.
    You should also ensure the item you're setting to invisible is not the current item (check :system.cursor_item and go to a different item if necessary).

Maybe you are looking for