Dynamically show/hide columns in the reports of the IR

Env

RDBMS: Oracle XE 11.2

Request Express 4.2.4.00.08


Hi all

I am bulding an open source oracle apex app to track aircraft using ADS - B technology.

I have somes types of units.  for example (kilometers, miles, knots, feet and metres).

So, in the report of the IR, I want pick capable of showing a unit in time.

For example

Radio Group.

Ground speed: (*) km/h () Mhp (Knt)

Vertical speed: (*) ft/s (m/s)

Can anyone help to build a code or point a direction to get above result?

I tried already a thread, but did not work.

Apex: Display/hide report column with Radio button. 2 cents to Oracle by Christoph

Display / hide column IR dynamically


I have a limited knowledge of Oracle APEX.


Levi Pereira says:

I am bulding an open source oracle apex app to track aircraft using ADS - B technology.

I have somes types of units.  for example (kilometers, miles, knots, feet and metres).

So, in the report of the IR, I want pick capable of showing a unit in time.

For example

Group of radio buttons.

Ground speed: (*) km/h () Mhp (Knt)

Vertical speed: (*) ft/s (m/s)

There are different ways to do this. Probably the easiest would be:

  1. Create lists of values (LOVs) for units.
  2. Add the elements of the Group of radio -based unity LOVs report interactive region (IR), by specifying one of the units as a default value.
  3. Present the radio group via the Items property of the Page to send IR region.
  4. Create multi-column report for each metric combination / unit.
  5. Control the display of the report columns (applies to IR, but also classic report columns) conditionally using value of element in the Expression 1 = Expression 2 conditions Expression 1 is the group element of relevant radio and Expression 2 unit LOV value corresponding to that used in the column of the report.
  6. Add a dynamic action on the evolution of the components of the radio to refresh the IR region.

A less obvious approach would also use LOVs, group radio elements and dynamic action of change/update as above, but only have one column for each measure in the report. The column value is calculated using an expression based on the value of the radio group, for example:

.
.
.
/* Assuming base speed unit is km/h */
  ground_speed
* case :p1_ground_speed_unit
    when 'mph' then 0.621371
    when 'kn' then 0.539957
    else 1
  end ground_speed
.
.
.

The unit could be indicated in the column heading in the report referring to the element of the device by using a substitution of static text string:Ground Speed (&P1_GROUND_SPEED_UNIT.)

Tags: Database

Similar Questions

  • Show hide columns generates error on the page if not found data

    Hello

    Has anyone ever encountered a situation where a page error when using the feature show hide column and no data is returned.

    My region to report is based on SQL and when calling at the start page or when restrictions are no match all all the data that appears is the message "No data found" by default. The method used, I pulled Carl Backstrom (RIP) application.

    < script type = "text/javascript" >
    function html_HideBasedOnCheckBox (pThis, pThat) {}
    if(pThis.Checked == true) {}
    html_ShowCellColumn (pThat);
    } else {}
    html_HideCellColumn (pThat);
    }
    }

    function getCellIndex (pRow, pCell) {}
    If (document.all) {}
    for (var i = 0; i < pRow.cells.length; i ++) {}
    If (pRow.cells [i] == pCell) {l_Count = i}
    }
    } else {}
    l_Count = pCell.cellIndex;
    }
    Return l_Count;
    }

    function html_HideCellColumn (pId) {}
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    for (var i = 0; i < l_Rows.length - 1; i ++) {}
    html_HideElement (l_Rows.cells [l_CellI]);
    }
    return;
    }

    function html_ShowCellColumn (pId) {}
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    for (var i = 0; i < l_Rows.length - 1; i ++) {}
    html_ShowElement (l_Rows [i]. Cells [l_CellI]);
    }
    return;
    }

    < /script >

    The attributes of HTML form elements is: onclick = "html_HideBasedOnCheckBox (this, this.value)" "

    The LoV for this box is static for a column.

    This set works very well if the data is returned. It must have something to do with the topics defined in the SQL code and therefore are not displayed when no data is returned. The code is then try to hide or something that does not exist.

    The part where he falls is during the setting of the variables:

    function html_HideCellColumn (pId) {}
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    ... and more specifically the last variable setting: l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    Does anyone know how I can get around this by using the method of SQL report i.e. Select col1 col2 "Column 1", "column 2" From myTable etc. or if it is possible to make up for it at the beginning that is

    If NO_DATA
    then
    dont_hide/display_any_columns that_dont_exist
    on the other
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    for (var i = 0; i < l_Rows.length - 1; i ++) {}
    html_ShowElement (l_Rows [i]. Cells [l_CellI]);
    }
    return; ........

    ???

    See you soon,.

    Mike

    Hi Mike,.

    In fact, you can check the existence of the cell:

    var l_Cell = $x(pId);
    if (l_Cell)
    {
     rest of the code to hide the column
    }
    

    As long as l_Cell makes reference to a valid page element, then the if test passes and the rest of your code can work.

    Andy

  • Dynamic number of columns in the table

    Hello

    I use JDev 10.1.3.3.0 with ADF. I just want to create a table, with a dynamic number of columns in the table. The background is that a user of my webapplication can create and submit a sql query. Now, I have to show him the results. My idea was, I have save the result in a bean managed (ResultTable), which is stored in the session context and map at my table in my page.

    If I search the Forum and don't get only one useful thread: {: identifier of the thread = 971888}, but I don't exactly understand. What is the CollectionModel? Do I need this?

    I'm trying to report on the following:

    ResultTable
    public class ResultTable {
    
        public static final String SESSION_NAME = "ResultTable";
        private ArrayList<ResultColumn> columnList; 
        private CollectionModel collectionModel;
    
        public ResultTable() {
        }
    
        public ArrayList<ResultColumn> getColumnList() {
            return columnList;
        }
    
        public void setColumnList(ArrayList<ResultColumn> columnList) {
            this.columnList = columnList;
        }
    }
    ResultColumn
    public class ResultColumn {
        
        private ArrayList<ResultRow> rowList;
        private String name;
    
        public ResultColumn() {
        }
    
        public ArrayList<ResultRow> getRowList() {
            return rowList;
        }
    
        public void setRowList(ArrayList<ResultRow> rowList) {
            this.rowList = rowList;
        }
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    }
    ResultTable
    public class ResultRow {
        
        private String value;
    
        public ResultRow() {
        }
    
        public String getValue() {
            return value;
        }
    
        public void setValue(String value) {
            this.value = value;
        }
    }
    My showResult.jspx
    <af:table emptyText="No items were found"
              value="ResultTable.columnList"
              var="column"
              varStatus="colStatus"
              id="table1">
      <af:forEach items="#{column.rowList}" var="row" varStatus="rowStatus">
        <af:column sortable="false" headerText="#{column.name}" 
                   id="column#{colStatus.index}">
          <af:outputText value="#{row.value}"
                         id="outputText#{rowStatus.index}"/>
        </af:column>
      </af:forEach>
    </af:table>
    The ResultTable was filled with data, but the Board is not filled. So, I think, it must be rejected to the data binding.

    I get warnings and errors to run too. But I don't know if they are the result or cause of my problem.
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.renderkit.core.xhtml.TableRenderer renderTableWithoutColumns
    WARNUNG: Table with id: form1:table1 has no visible columns!
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElement
    SCHWERWIEGEND: Element End name:span does not match start name:div
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElement
    SCHWERWIEGEND: Element End name:span does not match start name:div
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElement
    SCHWERWIEGEND: Element End name:form does not match start name:span
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElement
    SCHWERWIEGEND: Element End name:body does not match start name:form
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElement
    SCHWERWIEGEND: Element End name:html does not match start name:body
    Concerning

    Majo

    Hi Mario,.

    
      
        
          
        
      
    
    

    Note that your JSPX snippet above has serious shortcomings:

  • 'ResultTable.rowList' is not an EL expression, but the value attribute of the af: table must refer to an EL expression
  • Items AF:foreach = "#{row.cellList}"-you don't have to store information about the columns of all rows, more it won't work as af:forEach tag may not see the value of the expression of EL #{line} (or any component EL expression created). " See the tagdoc here: http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/forEach.html
  • "ID =" Column #{cellStatus.index} "and id =" outputText #{rowStatus.index} "are invalid and that they don't compile even as id attributes cannot contain EL expressions.

    .

    I think to solve your problem, you need three things:

  • List of columns (for example the list If you need to store only the names of column or list If you need additional information),.
  • list of lines,
  • a line can be a map (with the name of the column - cell data mapping; card e.g.) or a list (with columns indexed; for examplelist).

    Example with the lines of the map:

    JSPX snippet:

    
      
        
          
        
      
    
    

    The ResultTable bean:

    public class ResultTable {
    
        private List columnList;
        private List> rowList; 
    
        public ResultTable() {
        }
    
        public List getColumnList() {
            return columnList;
        }
    
        public void setColumnList(List columnList) {
            this.columnList = columnList;
        }
    
        public List> getRowList() {
            return rowList;
        }
    
        public void setColumnList(List> rowList) {
            this.rowList= rowList;
        }
    
    }
    

    Type ResultColumn:

    public class ResultColumn {
    
        // additional fields if needed...
        private String name;
    
        public ResultColumn() {
        }
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    }
    

    AF:table display correctly after the initialization of the values in your beans properly filled ResultTalbe (e.g. to fill the list of rank with the lines).

    Hope this helps,
    Patrik

  • How always show left column on the screen, when I scroll to the right of a large spreadsheet

    How always show left column on the screen, when I scroll to the right of a large spreadsheet

    If the left column is a column header, you can check freeze header columns in the table menu.

    Better not to use TOO many columns.  Numbers works best with relatively little.

    SG

  • By using the analytical function to sort without showing this column in the result.

    Hello

    We use the Oracle 11.2

    How to use Oracle Analytics to sort the output of a query without showing this column in the result?

    Here's my query:

    Select distinct nvl(SRC_CHR_NM,'0') | » #'|| NVL(EXPL_SRC,'0') | » #'|| NVL(DIM_NM,'0') | » #'|| NVL(DIM_CHR_NM,'0') | » #'|| NVL(DIM_CHR_ABR,'0') | » #'||

    Decode (InStr (NVL(SRC_COL_NM,'0'), 'trim ('),'1 ', Replace (NVL(SRC_COL_NM,'0'),'trim (',' trim(PRM_DTL.'), '0',' PRM_DTL.)))) » || NVL(SRC_COL_NM,'0')) AS ALLOFIT,

    DIM_NM

    from EXPL_CONFIG where SBJ_AREA_CD = 'PRMDTL. '

    I want to use analytical to sort by DIM_NM but I do not want to show. I want to just just the ALLOFIT column to show in the output.

    Something like "row_number() over (order by DIM_NM desc).

    Thank you!

    Hello

    If you SELECT SEPARATE, then you can only ORDER OF things in the SELECT clause. (Do you really need to do SELECT DISTINCT?  Often, it's just an inefficient way to remove the lines that do not need to be there at all).

    Move making the SELECT DISTINCT in a subquery and make the ORDER BY (and nothing else) in the main query.

    I hope that answers your question.

    If this isn't the case, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

  • Show/Hide button on the line on a tabular presentation depend on the values of line.

    I want to show/hide (or toggle so easy) a button link to page of line on a dependant in a table on the other line values.

    For example if I had a table, built form using the form wizard based on the EMP table with a query: -.

    Select
    EMPNO,
    EMPNO EMPNO_DISPLAY,
    ENAME,
    EMPLOYMENT,
    BISHOP.
    HIREDATE,
    SAL,
    COMM,
    DEPTNO,
    'button' but1
    from EMP

    The column of buttons is used as a link to a page. But I only want to be displayed/activated if the WORK is a "SELLER". Does anyone know how to do this? Or give me any suggestions?

    Another option would be to have a button under the lines enabled/disabled depending on when you click on a line and this line having a JOB "SELLING."

    Thanks, Pete

    Then - under condition - select the exact anchor (+ image) of your select statement (and display it as as a standard report column).
    (Unfortunately) does not allow any conditional display for a link (or a link element) in a tabular form (in the current version, should be a nice improvement however).

  • Hide column of the HFM 11.1.2.3 web form

    Hello

    I'm quite new to HFM and I have what could be a very stupid problem.

    Our requirement is to show on an online form < Parent Curr Total > by entity, a column of eliminations and assets < entity Curr Total >

    Entity 1 Entity 2 Entity n. Eliminations Holding

    As the eliminations are at the basic level and boils down not to the parent company, tried to add each column of elimination of entities to the web form and calculate a column as being the sum of all of the eliminations.

    So much and so much good, but when it comes to hidding columns in entity removal, I simply have not found how. I tried to change the width of the columns of 1px, 1 pt, 0% etc and the column remains with the same width, but IV ' e did the same on the 11.1.1.3 version and it works, kind of weird. I also tried to hide the added display: no and he's hiding the values, the column always shows.

    Summer research everywhere and have not been able to find advice on how to hide the columns, so I would be very happy if somenone could help me.

    Thank you very much for your time,

    See you soon

    Santiago

    Hello. Build the questionnaire to show the children of the parent entity to in the first column, the parent entity to in the third column and the second column as col3 calc less col1.

    Eric

    Eric Erikson, CPA

    Consultant independent HFM

    828-485-8454.

    [email protected]

    www.LinkedIn.com/in/ericerikson

    ericerikson.blogspot.com

  • Show/hide region when the drop-down list is changed

    Hello

    I need show/hide a region when dropdow (selection list) is changed.

    I used dynamic action:

    Event : change
    Selection Type : Item(s)
    Item(s):P50_my_list
    condition : JS expression
    $v('P50_my_list') == 1
    
    True Action :
    Action : Execute JS Code
    Code : $('#region_name').show();
    
    // OR use Action ==> Show
    
    

    False Action :
    Action : Execute JS Code
    Code : $('#region_name').hide();
    
    // OR use Action ==> hide
    

    But the region has still shown!

    Also, I used a JS function (in the dynamic action of the place) but I met the same result.


    function showHideRegion(pValue)
    {     var show_or_hide = $x(pValue).value;
        if (show_or_hide == 1)
          {$('#ALTERNATIVEN_LIST').hide();}
        else
          {$('#ALTERNATIVEN_LIST').show();}
    }
    
    
    

    Hello

    I solved the problem with the js function:

    function showHideRegion (pThis, pValue)

    {var show_or_hide = $x (pValue) .value;}

    If (show_or_hide == 1)

    {

    var element = $x_UpTill (pThis, 'DIV');

    Element.style.display = 'none ';

    } else {}

    var element = $x_UpTill (pThis, 'DIV');

    Element.style.Display = "block" ;}

    }

  • Dynamic requirement of columns in a report

    Hello

    I have a requirement in my report:

    Report takes month & year presentation Variable as input and the result should be dynamic over the past 11 months in the form of columns in my report.

    For example: if I choose to September 2011, report should have 11 columns that will begin from August 2010 until September 2011
    If I choose to August 2011, the report should have 11 columns that will begin from July 2010 until August 2011

    Please suggest how optimized to achieve this result.

    Thanks in advance.

    Kind regards
    Rahul

    Don't go you will get 11 months.. C.V. gives you just the latest data from 11 months...

    I use at least 5-6 reports like this. Check out my second link as well...

    Create an environment and then main report shud filter based on report middle values.

    Published by: Deepak Gupta on 13-Aug-2011 01:53

  • display / hide column of the table running

    Are there known issues with display / hide a column of the table at run time?

    I have a table that contains a column with a check box and another with a radio button.  If the user is allowed to select more than one row in the table (as indicated by a form variable), then I want to hide the column of radio and checkbox column.  If not, I want to show / hide the contrary.

    I show / hide the column header too.  When I preview the form, however, the data in the table appears "scoot" left and placed in the column that is hidden, so to speak.

    Here is a view of the design of the table:

    tableDesignView.jpg

    And a view of the execution of the table.  You can see the radio is hidden, but the "account number" column wants to crush in the (hidden) radio column,

    tableRunTimeView.jpg

    Here is the script, I'm very confident in this small snippet of code because the lines of account were filling wonderfully until I added the column of radio buttons and the script to show/hide.

    Put the account data in the table

    function

    setAccountData (objAccountRow, objAccountItem) //Pass in the line and data to complete line

    {

    stuff the line

    objAccountRow.accountNumber.rawValue

    = objAccountItem.accountNumber;

    objAccountRow.accountName.rawValue

    = objAccountItem.accountName;

    objAccountRow.accountBalance.rawValue

    = objAccountItem.accountBalance;

    display the check box or radio button, depending on the number of accounts they are allowed to select (as specified by the form variable)

    var searchNumAccounts = objFragment.resolveNode("searchNumAccounts").value; Variable //Form

        if (searchNumAccounts==1)

    { //show the column of radio buttons and hide the checkbox column }

    hideObject (objResultsSubform.accounts.HeaderRow.txtSelect);   <-it's exaggerated here, to hide the table for each row header column,...

    hideObject (objAccountRow.accountSelected);

    showObject (objResultsSubform.accounts.HeaderRow.txtRadioSelect);

    showObject (objAccountRow.radioSubform.radioGroup.selected);

    }

    on the other

    { //show the checkbox column and hide the column of radio }

    hideObject (objResultsSubform.accounts.HeaderRow.txtRadioSelect);

    hideObject (objAccountRow.radioSubform.radioGroup.selected);

    showObject (objResultsSubform.accounts.HeaderRow.txtSelect);

    showObject (objAccountRow.accountSelected);

    }

    }

    OK I got it. The table object implements a container to contain the fields. You hid the ok fields, but you then never reset the row in the table to have only two columns. I copied the parameter of the XML source so that I would have the exact width and then deleted the one I wanted to hide. Now everything works fine.

    See the example updated the.

    Paul

  • Hide columns in the front-end, i.e. the Oracle answers

    Hello

    I wonder if it is possible to hide the columns considered non-essential as the answers ID so that the front end users only see the column that should
    be exposed for reporting.

    Thank you

    Remove unnecessary columns from the presentation layer in the repository.

  • Avoid complete when page is rendered dynamically show/hide elements in a page

    Hi experts,


    I use Jdev 11.1.1.5. My use case does not show/hide multiple buttons/panelBoxes on the same page.

    My approach is to define the rendered property pointing to a session variable

    <af:panelBox  rendered="#{sessionScope.render_panel1}"
    <af:commandButton action="#{backingBeanScope.myBean.configureRenderButtons}" rendered="#{render_button1}"/>
    

    .. .and go to the same page by using an action method in a managed bean:

    public String configureRenderButtons() {
       JSFUtils.storeOnSession("render_panel1", "true");
       JSFUtils.storeOnSession("render_button1", "false");
       ...
      return "same-page.jspx"
    }
    

    My problem is that I noticed that this full page is rendered whenever I press the button. So as soon as the page has grown in size, it became a bit slow for end users.

    Could you please advice on this?

    Kind regards

    Jose.

    I got the solution.

    I changed:

    (1) changed to visible, rendeded

    (2) partialSubmit added to the button

    (3) partialTrigger added to the component I need to show/hide (panelBox)

    (4) action changed to actionListener

    
    
    

    Hope this helps (and hope it's a good practice, please post!)

    Jose.

  • Creative cloud shows a column of the app

    Hello

    When I download creative cloud and tries to download the first pro trial version, it won't let me because it does not show a column app when I open the creative application of cloud. I wonder if it's because of the new update for creative cloud 24/09/15. If anyone has any suggestions or information about it, which would be greatly appreciated because I really want to try the first pro trial version.

    Thank you!

    Please see Re: missing Creative Cloud Desktop applications tab or Re: applications tab will not be displayed in the creative application of cloud

  • How to dynamically add a column to the DataGrid

    Hey there everyone. Forgive me, I'm very new to this.
    I use a data grid to display values analyzed in an xml file.
    The application needs of 5 columns, no problem, however, if a value is present in the xml file, I need to add another column.
    If I have a var defined as
    var gps_present which is a string, and if the value == 'Yes' adds a column in my datagrid?

    < mx:DataGrid id = "summary_grid" x = "10" y = "15" width = "500" height = "434".
    dataProvider = "{summary.lastResult.phones.phone}" >
    < mx:columns >
    < mx:DataGridColumn headerText = "phone number" dataField = "phone number" width = "3" / >
    < mx:DataGridColumn headerText = "inc_java" dataField = "inc_java" width = "3" / >
    < mx:DataGridColumn headerText = "inc_sms" dataField = "inc_sms" width = "3" / >
    a logic here if inc_gps == 'y '.
    < mx:DataGridColumn headerText = "inc_gps" dataField = "gps" width = "3" / >
    < / mx:columns >
    < / mx:DataGrid >


    Thank you for any advice on that.

    nephish,

    Yes. Sorry, displaying large blocks of code on the forums is a little tricky. Posted an example here: http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-contr ol in flex /

    Hope that helps,
    Peter

  • Show a column on the title

    Hi friends,

    I have a doubt about how to add a column on the title

    Say if we have a title, static text, etc... can we form a column next to him...

    Thank you
    Mallli

    As I mentioned before, use a Narrative view and write

    My client as of the @1

    Where 1 represents the position of the date field that you mention.

    J.

Maybe you are looking for