dynamic columns

I use

DB 10g Release 10.2.0.1.0

Oracle 6i 6.0.8.8.3 reports

in the table below.

How can I have the dynamic columns 'fault' in reports in the order of its highest value of occur_times.

and a view that gives me no reports (formats below).

CREATE TABLE dem

(trid NUMBER (9.0),)

tr_date DATE,

point VARCHAR2 (10),

failure VARCHAR2 (5).

occur_times NUMBER (9.0))

/

INSERT INTO dem

VALUES

(1, 26 - JAN 2016', 'MC', 'AB', 3)

/

INSERT INTO dem

VALUES

(2, 26-JAN 2016', 'MC', 'FM', 2)

/

INSERT INTO dem

VALUES

(3, 26 - JAN 2016', 'MC', 'SO', 5)

/

INSERT INTO dem

VALUES

(4, 27 - JAN 2016', 'MC', 'AB', 8)

/

INSERT INTO dem

VALUES

(5, 27-JAN 2016', 'MC', 'FM', 2)

/

INSERT INTO dem

VALUES

(6, 27-JAN 2016', 'MC', 'SO ', 1).

/

Commit

/

example1

"Report of input parameter: count 26 January 2016 ' to 26 January 2016"

Output format of report

point defects Total SW AB FM

-------   ----------------   ----    -----  -----

MC                10       5      3      2

e.g.2

"Report of input parameter: count 26 January 2016 ' January 27, 2016"

Output format of report

point defects Total FM SW AB

-------   ----------------   ---------  -----

21 11 6 4 MC

in example1 in date range, the flaws in the order of its value max occur_times is FM SW, AB,

but in e.g.2. in view of the date range default by order of its value max occur_times is AB, SW, FM

THE FAULT of MAX VALUE should take precedence i.e. dynamically in the reports.

concerning

teefu

Lahore, pakistan.

You must create the parameter in the oracle reports. When the report of the form calling create the parameter list and then pass the required parameter.

SELECT the item,

fault,

Sum (occur_times) tot_times,

ROW_NUMBER() over (ORDER BY SUM (occur_times) DESC) rn

DEM

WHERE the fault ("AB", "FM", "SW")

AND tr_date BETWEEN TO_DATE(:p_dt1,'dd-Mon-yyyy') AND TO_DATE(:p_dt2,'dd-Mon-yyyy')

GROUP BY item, fault

;

Tags: Database

Similar Questions

  • Dynamic columns based on the user login

    Dear Experts,

    Is it possible to display the columns dynamically according to the connection of the BI Publisher user?

    For example, if the report of RTF model has 10 columns in total and if I connect with a user named "abc", I should be able to see, say 6 columns containing information about the user "abc".

    And if I have connection with "xyz", I should be able to see, say 7 columns containing information about the user "xyz".

    I will be able to assign to which column should be displayed to the user who?

    If there is a way to achieve this scenario, please let me know as soon as possible, since there is an urgent need.

    Your help will be very appreciated.

    Thanks in advance!

    Yes, using: xdo_user_name in the SQL data model, you can get the details for user identification.

    Then use this model column RTF for display of the dynamic columns.

    Example:

    Select: xdo_user_name as USER_ID of the double

    In RTF

    Column header

    Column data

  • OBIEE dynamic column headings based repository Variables

    Hello

    How can we provide variable name of the repository (from RPD) as column headings in reports (presentation Services).

    Can you please suggest me how to do it?

    Thanks in advance...

    RAM

    Hello

    You can use the following link.

    Oracle Business Intelligence 11g: OBIEE 11 g dynamic column headings

    I used the variable presentation here, you can substitute the variable repository. The difference is that you don't need to create variable presentation, instead you use repository variable there.

    If you are not clear with this, pleas come back. I'll write a new message on your problem.

  • OBIEE 11 g dynamic column headings

    I doubt I should do some dynamic column headings in OBIEE 11 g

    I have guest months (1,2,3...)

    but in the report I want column header to be something as if showing 1 do Jan...

    How to achieve this and is for the column headers!

    Thank you

    NK

    I fixed that with a dummy work around

    created a new prompt and pass values of the previous message and put this quick as a filter on the dashboard (dashboard properties).

    and used this new prompt variable as a header for the report

    He worked

    Thank you

    NK

  • Creating a dynamic column editable

    I tried to make my dynamic columns as editable. The problem is that my dynamic columns are nested.

    Now editable column works fine when I have diff columns with a different name. For example, col1, col2, col3 (not nested)

    Or I nested columns like "pass"(parent) given two columns col1 and col2. ".

    But, when I use them in a dynamic of columns in which all of them have the same name, in the example below, each with the same name 'col', I can change all of them, but the textfield never faded away, when I click on ENTER.


    Suppose I have an editable column with col name:
    for (final CategoryTypeVO type : typeList)
                    {
                           TableColumn<ItemVO, Integer> col = new TableColumn<ItemVO, Integer>(type.getTypeName());
                          col.setMinWidth(100);
                          col.setEditable(true);
                          col.setCellFactory(cellFactory);
                         
                         
                          col.setOnEditCommit(
                                   new EventHandler<TableColumn.CellEditEvent<ItemVO, Integer>>() {
                                   public void handle(TableColumn.CellEditEvent<ItemVO, Integer> t) {
                                   ((ItemVO)t.getTableView().getItems().get(
                                   t.getTablePosition().getRow())).getListType().get(type.getTypeId()).setQuantity(t.getNewValue());
                                   }
                                   });
                           quantity.getColumns().add(col);
                         }
    and cellfactory as:
    final Callback<TableColumn<ItemVO, Integer>, TableCell<ItemVO, Integer>> cellFactory = new Callback<TableColumn<ItemVO, Integer>, TableCell<ItemVO, Integer>>() {
                        public TableCell call(TableColumn p) {
                             return new EditingCell();
                        }
                   };
    and Editing class as
    class EditingCell extends TableCell<ItemVO, Integer> {
               
               private TextField textField;
              
               public EditingCell() {}
              
               @Override
               public void startEdit() {
                   super.startEdit();
                  
                   if (textField == null) {
                       createTextField();
                   }
                  
                   
                   setGraphic(textField);
                   setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
                   textField.selectAll();
                   Platform.runLater(new Runnable() {
                       @Override
                       public void run() {
                           textField.requestFocus();
                       }
                  });
               }
              
               @Override
               public void cancelEdit() {
                   super.cancelEdit();
                  
                   setText(String.valueOf(getItem()));
                   setContentDisplay(ContentDisplay.TEXT_ONLY);
               }
          
               @Override
               public void updateItem(Integer item, boolean empty) {
                   super.updateItem(item, empty);
                  
                   if (empty) {
                       setText(null);
                       setGraphic(null);
                   } else {
                       if (isEditing()) {
                           if (textField != null) {
                               textField.setText(getString());
                           }
                           setGraphic(textField);
                           setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
                       } else {
                           setText(getString());
                           setContentDisplay(ContentDisplay.TEXT_ONLY);
                       }
                   }
               }
               
              
               
          
               private void createTextField() {
                   textField = new TextField();
                   //textField.setText(getString());
                   textField.setText("0");
                   textField.setMinWidth(this.getWidth() - this.getGraphicTextGap()*2);
                   
                   textField.focusedProperty().addListener(new ChangeListener<Boolean>() {
    
                          @Override
                          public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2) {
                              if (!arg2) {
                                  commitEdit(Integer.parseInt(textField.getText()));
                              }
                          }
                      });
                   
                   textField.setOnKeyReleased(new EventHandler<KeyEvent>() {
                       @Override public void handle(KeyEvent t) {
                           if (t.getCode() == KeyCode.ENTER) {
                               commitEdit(Integer.parseInt(textField.getText()));
                           } else if (t.getCode() == KeyCode.ESCAPE) {
                               cancelEdit();
                           }
                       }
                   });
               }
    
              
               private String getString() {
                   return getItem() == null ? "" : getItem().toString();
               }
    Now what happens is this thing works fine if I separate columns with distinct names. But when it comes to dynamic columns, it fails, once I have edit a cell, the text field never leaves his place. It gets stuck in the cell. Any help!

    Published by: abhinay_a on January 21, 2013 12:31 AM

    Do not know what is the problem in your code, but it is easier to use TextFieldTableCell than building your own TableCell from scratch.

    This change to the example I posted in How to create a tableview for this? works for me:

    package itemtable;
    
    import javafx.application.Application;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.scene.Scene;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableColumn.CellDataFeatures;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.control.cell.TextFieldTableCell;
    import javafx.scene.layout.BorderPane;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    import javafx.util.converter.NumberStringConverter;
    
    public class ItemTable extends Application {
    
      @Override
      public void start(Stage primaryStage) {
        final DAO dao = new MockDAO();
        final ChoiceBox choiceBox = new ChoiceBox();
        choiceBox.getItems().setAll(dao.getCategories());
    
        final TableView table = new TableView();
    
        // Make table editable:
        table.setEditable(true);
    
        final TableColumn nameCol = new TableColumn("Name");
        nameCol.setCellValueFactory(new PropertyValueFactory("name"));
        nameCol.setCellFactory(TextFieldTableCell.forTableColumn());
        final TableColumn priceCol = new TableColumn("Price");
        table.getColumns().addAll(nameCol, priceCol);
    
        choiceBox.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener() {
              @Override
              public void changed(ObservableValue observable, Category oldValue, Category newValue) {
                table.getItems().clear();
                priceCol.getColumns().clear();
                for (final Type type : newValue.getTypes()) {
                  final TableColumn col = new TableColumn(type.getName());
                  col.setCellValueFactory(new Callback, ObservableValue>() {
                    @Override
                    public ObservableValue call(CellDataFeatures cellData) {
                      Item item = cellData.getValue();
                      if (item == null) {
                        return null;
                      } else {
                        return item.priceProperty(type);
                      }
                    }
                  });
    
                  // Make column editable:
                  col.setEditable(true);
                  col.setCellFactory(TextFieldTableCell.forTableColumn(new NumberStringConverter()));
    
                  priceCol.getColumns().add(col);
                }
                table.getItems().setAll(dao.getItemsByCategory(newValue));
              }
            });
    
        BorderPane root = new BorderPane();
        root.setTop(choiceBox);
        root.setCenter(table);
    
        Scene scene = new Scene(root, 600, 600);
        primaryStage.setScene(scene);
        primaryStage.show();
      }
    
      public static void main(String[] args) {
        launch(args);
      }
    }
    

    Edited by: James_D January 22, 2013 07:22

  • Adding dynamic columns to datagrid at the beginning of the datagrid

    Hello friends,

    There is a datagrid that is static. and I m adding a dynamic column. It is added at the end of the static data grid

    but I want to add dynamic at the begning of the datagrid column can someone help me on this.

    Thanking you,

    Kind regards

    Gallot

    datagridfeeamount.dataProvider = new ArrayCollection (event.result.rows.row) collection;

    the word 'new', after that the = was supposed to be red and larger

  • Dynamic columns in dashboard prompt

    Hi all
    I have to 'TOP' dispay & dynamic value 'BOTTOM' in the drop-down list of the dashboard invites the creation of a dynamic column value in the drop-down list prompt dashboard? I'm trying to create in writing view sql result but not getting does not correctly according to the selection of HIGH and low, I must make a report changes
    SELECT CASE WHEN 1=0 THEN ExistedPresentationColumn ELSE 'TOP' END FROM SubjectArea
    
    UNION ALL
    
    SELECT CASE WHEN 1=0 THEN ExistedPresentationColumn ELSE 'BOTTOM' END FROM SubjectArea
    
  • Missing cells in the table of dynamic columns

    Hello

    I am creating a table using dynamic columns. Here's an example simplified data that I use:

    < sales >
    ... < drive >
    ... Honda < brand > < / brand >
    ... < color > green < / color >
    ... < / car >
    ... < drive >
    ... Nissan < brand > < / brand >
    ... < color > blue < / color >
    ... < / car >
    ... < drive >
    ... Honda < brand > < / brand >
    ... < color > blue < / color >
    ... < / car >
    < sales >

    I am grouping the brands for the lines, and I want a number of colors as my dynamic column. I find myself with a table that looks like this:

    ----------------------------------------------------------------------------------
    Brand | Blue | Green |
    ----------------------------------------------------------------------------------
    Honda | 1. 1.
    ----------------------------------------------------------------------------------
    Nissan | 1
    --------------------------------------------------------

    Since there is no green Nissan, a cell not created so I find myself with a hole in my table. Ideally, I would want a cell containing 0 to be in this space.
    Is it possible, or to all the least have a cell in this space, so I did not have a table with gaps?

    Thank you!

    Hi cc22

    If you have a look at these. http://winrichman.blogspot.com/search/label/cross%20tab
    you will identify yourself,

    its simple... If this is not the case, let me know.

  • Help by calling the dynamic columns in anonymous blocks

    my code:

    DECLARE
    col1 VARCHAR2 (20): = "City";

    BEGIN
    I'm in (select * from xbd.cus_ord where rownum < 10)
    LOOP
    - I would call col1 dynamically here in my outings DBMS.
    DBMS_OUTPUT. Put_line (i.col1);
    END LOOP;
    END;
    /


    The code above I tried to call a dynamic column. How can I do that.
    I Heve been tried differently using EXECUTE IMMEDIATE. It still does not work.

    THX,
    VI
    DECLARE
       col1        VARCHAR2(30)   := 'object_name';
    
       TYPE REF_CURSOR IS REF CURSOR;
    
       refCursor   REF_CURSOR;
       text        VARCHAR2(4000);
    BEGIN
       OPEN refCursor FOR 'SELECT ' || col1 || ' FROM all_objects WHERE ROWNUM < 10';
    
       LOOP
          FETCH refCursor
           INTO text;
    
          EXIT WHEN refCursor%NOTFOUND;
          DBMS_OUTPUT.PUT_LINE(text);
       END LOOP;
    END;
    /
    
  • Extraction of dynamic columns in table

    I have table with 1000 rows and 200 columns. The columns have additional suffix IE
    Table = 'X '.
    Columns = ID, A, B, C, D1, D2, D3... D200

    I would like to get the values of each column so that I can treat them accordingly.


    OPEN c1 to SELECT * FROM X

    LOOP
    C1 FETCH BULK COLLECT INTO l_dies;

    FOR indx IN 1... l_dies. COUNTY
    LOOP
    FOR indx to 0... 200
    LOOP
    colStr: = l_dies (indx). || » D'|| INDX; <-trying to dynamic column of concat name, but it gives an error.
    Dbms_output.put_line ('indx =' | indx |) 'col = value' | colStr);
    END LOOP;
    END LOOP;
    END LOOP;

    Maybe it's not the right way, but just an example of what I want to achieve.

    Thanks in advance.

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:1035431863958

    Visit this link especially the very first post of Tom (Proc print_table).

    I hope this helps.

    Concerning

    REDA

  • From dynamic column change for quick selection of values.

    Hello

    Requirement is based on the selection of value FAST I need to change the column values as like: "QTD_MONTH"


    for example. If the prompt value is February then the column value must be "QTD_February"

    This QTD_February is must be dynamic based on the quick selection.

    Thank you

    A Penning.

    Hello

    Instead of making the quick selection. Build separate column in the report. According to the requirement.

    Try the following formula,

    for example,.

    FILTER ("measue' to the HELP of CAST (SUBSTRING("TIME_Dimension"FROM 2 FOR 2) AS INTEGER) IN (@{wk} {26}))

    Thank you.

  • APEX_COLLECTION for IR report with dynamic column no longer works in APEX5.0, do you have a solution?

    Hi guys,.

    As a basis for the application of the requirement of the company, I used the post of Vincent Deelen here:

    http://vincentdeelen.blogspot.ro/2014/02/interactive-report-based-on-dynamic-SQL.html

    However, since our upgrade to APEX 5.0, I get the following error:

    ORA-01445: cannot select ROWID, or sample, join without table views preserved key

    I can see in the debug statement that the query that fails is the following:

    SELECT apxws_row_pk,

    "C001."

    "C002."

    "C003."

    "C004."

    "C005."

    "C006."

    "C007."

    "C008."

    "C009."

    "C010."

    "C011."

    "C012."

    "C013."

    "C014."

    "C015."

    "C017."

    "C018."

    "C019."

    "C021."

    "C022."

    "C023."

    "C024"

    "C030."

    "C031."

    "C032."

    "C041."

    "C042."

    "C043."

    "C044."

    "C045."

    "C046."

    Count (*) (AS apxws_row_cnt)

    Of

    (SELECT *)

    Of

    (SELECT b.ROWID apxws_row_pk,

    b.*

    Of

    (SELECT *)

    Of

    (SELECT * FROM APEX_collections WHERE collection_name = "IR_COLLECTION_877")

    )

    ) b

    + 0

    + 0

    WHERE rownum < = to_number(:APXWS_MAX_ROW_CNT)

    ORDER BY apxws_row_pk

    From my understanding, the ROWID is a new implementation for APEX 5.0, this post has not been monitoring since may:

    Re: Error ORA-01445 tabular form on a Collection in APEX 5

    Can this be repaired? Does anyone have a solution?

    Marc Sewtz-Oracle, I'm sorry for the intrusion, but I saw your last answer in this particular post above, and maybe you have some news!

    Thank you

    Digital

    Hi all

    I did the simplest thing! Reproduce the solution:

    -L'IR

    -Elements of Page 50

    -Conditions placed on all 50 columns

    Basically, I re-did everything and it works great!

    It's amazing how such a simple solution does work sometimes!

    Thank you

    Digital

  • How to create a dynamic RTF report that creates dynamic columns based on the selection of dynamic columns in a table?

    Hi all

    Suppose I have table, whose structure changes frequently on a daily basis.

    For example. / / desc my_table gives you after the name of the column the day 1

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone


    Day 2, two other columns are added, viz, address and salary.

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone

    Address

    Salary


    Now, I want to create a Dynnamic RTF report which made extracting data from all columns from my_table daily. For this, I have defined a simultaneous program with XML output type and include in annex a data/definition of data model that takes XML as input and gives the final result of the conc program in EXCEL layout. I am able to do that for a constant number of columns, but don't know how to do it when the number of columns to display dynamically changes.

    For 1 day my XML file should be like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 1, EXCEL output RTF model should be like this.
    Name age phone

    Swapnill 23 12345

    For 2 days my XML file should be like this. With 2 new columns selected in the SELECT clause.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    ,Address
    ,Salary
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
      <element name="Address" value="Address" />
      <element name="Salary" value="Salary" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 2, exit EXCEL model RTF should be like this.
    Name address telephone pay

    23 12345 Madrid 100000 Swapnill

    Now, I don't know below things.

    • Make the dynamic XML as we did in the day 1 there are 3 columns in the SELECT statement and the day 2, 5 columns. I want to create a dynamic XML which must not be changed if the new columns are added into my_table. I don't know how to create this query and also create their corresponding items below.
    • Make the RTF model dyanamic as day 1 there are 3 exit EXCEL columns and the day 2, 5 columns. I want to create a dynamic RTF model that would display all the columns selected in XML dynamic. I don't know how the RTF will create new XML tags and how it will know where to place them in the report. Means, I can create model RTF day 1, by loading the XML data for 3 columns and place 3 tags XML in the model. But how he will create and place the tags for the new columns the day 2?

    Hope so, you got my requirement, it's difficult. Please let me know how I can implement the necessary solution using the RTF dynamically without any manual intervention.

    Kind regards

    Patricia K.

    Post edited by: SwapnilK

    Hi guys,.

    I was able to solve above the requirement.

    I created a procedure that would create & update (attached to the data definition) XML file dynamically for each race. This dynamic XML contains the SQL statement for the data query that is built dynamically. I am updating this XML file using XDOLoader utility to the definition of data. Then run my program customized to generate the excel output.

    Exit excel retrieves correct number of columns dynamically (3 on Day1 and Day2 5), with corresponding data records.

    Kind regards

    Patricia K.

  • How to modify the data with dynamic TableView with dynamic columns in JAVAFX

    Today, it is the demo to display the data from the CSV to the custom class without doing DAT file on tableView in JavaFX 2.0. I call this TableView as dynamic TableView because the tableview automatically manages the columns and rows.
    My research on the editable on tableView, we have a custom of the class and apply it to tableView to show that this demo is > http://docs.oracle.com/javafx/2/ui_controls/table-view.htm

    But in this case I can't do that because we don't know how many example of column with the csv file or .dat file... I want to make editable on this tableView in this case add TextField in the TableCell. How do custom class (because you don't have how column...) and so to do custom class then what thedesign of a custom for this case class?

    Could you please help me?

    It's the demo of code to display your csv or dat file in TableView

    private void getDataDetailWithDynamic() {
      tblView
    .getItems().clear();
      tblView
    .getColumns().clear();
      tblView
    .setPlaceholder(new Label("Loading..."));
      
    // @Override



      
    try {
           
    File aFile = new File(txtFilePath.getText());
           
    InputStream is = new BufferedInputStream(new FileInputStream(aFile));
           
    Reader reader = new InputStreamReader(is, "UTF-8");

           
    BufferedReader in = new BufferedReader(reader);

           
    final String headerLine = in.readLine();
           
    final String[] headerValues = headerLine.split("\t");
           
    for (int column = 0; column < headerValues.length; column++) {
                 tblView
    .getColumns().add(
                 createColumn
    (column, headerValues[column]));
           
    }

           
    // Data:

           
    String dataLine;
           
    while ((dataLine = in.readLine()) != null) {
                
    final String[] dataValues = dataLine.split("\t");
                
    // Add additional columns if necessary:
                
    for (int columnIndex = tblView.getColumns().size(); columnIndex < dataValues.length; columnIndex++) {
                      tblView
    .getColumns().add(createColumn(columnIndex, ""));
                
    }
                
    // Add data to table:
                
    ObservableList<StringProperty> data = FXCollections.observableArrayList();
                
    for (String value : dataValues) {
                     data
    .add(new SimpleStringProperty(value));
                
    }
                 tblView
    .getItems().add(data);
           
    }
      
    } catch (Exception ex) {
           
    System.out.println("ex: " + ex.toString());
      
    }


      
    for(int i=0; i<tblView.getColumns().size(); i++) {
           
    TableColumn col = (TableColumn)tblView.getColumns().get(i);
           col
    .setPrefWidth(70);
      
    }
    }

    private TableColumn createColumn(
      
    final int columnIndex, String columnTitle) {
           
    TableColumn column = new TableColumn(DefaultVars.BLANK_CHARACTER);
           
    String title;
           
    if (columnTitle == null || columnTitle.trim().length() == 0) {
                title
    = "Column " + (columnIndex + 1);
           
    } else {
                title
    = columnTitle;
           
    }


           
    Callback<TableColumn, TableCell> cellFactory = new Callback<TableColumn, TableCell>() {
           
    @Override
           
    public TableCell call(TableColumn p) {

                
    System.out.println("event cell");
                
    EditingCellData cellExtend = new EditingCellData();
                
    return cellExtend;
           
    }
      
    };

      column
    .setText(title);
      column
    .setCellValueFactory(cellFactory);
      
    return column;
    }


    Thanks for your reading.

    See this thread: Re: dynamically create columns

    This example is not editable, but to do so, simply add something like

        column.setCellFactory(TextFieldTableCell.>forTableColumn());
    

    the createTableColumn (...) method.

    Either said by the way, where did you code that you pasted in your post? It looks like in my previous post.

    Post edited by: James_D

  • Dynamic columns to fit the APEX 4.2 screens

    Hello

    I developed an interactive report in APEX 4.1 that displays data as a table with three columns (see query below). I want to dynamically set the number of columns depending on the size of the screen. For example, a smart phone should probably only display a single column and a 20 "+ monitor could hold five or six columns."
    create table photo
    (id number,
    last_modified date);
    
    select   trunc(last_modified, 'hh') hour_modified,
             -- Groups rownumbers into 3-columns-per-row         
             max(decode(mod(rn, 3), 1, last_modified, null)) modified1, 
             max(decode(mod(rn, 3), 2, last_modified, null)) modified2, 
             max(decode(mod(rn, 3), 0, last_modified, null)) modified3,
             max(decode(mod(rn, 3), 1, id, null)) id1, 
             max(decode(mod(rn, 3), 2, id, null)) id2, 
             max(decode(mod(rn, 3), 0, id, null)) id3
    from     (select   p.id,
                       p.last_modified,
                       row_number() over (partition by trunc(p.last_modified, 'hh') order by p.last_modified) rn
              from     photo p)
    group by trunc(last_modified, 'hh'),
             -- Groups rownumbers into 3-columns-per-row
             ceil(rn/3)
    order by hour_modified,
             modified1;
    As you can see, I'm currently hardcode the number of columns using the decoding functions and mod. thanks for the help!

    Yes

    I don't think you can use an instance of interactive report in this situation.

    In addition to needing a different report for each #columns you want to host.
    A lot of the interactive report features must be switch of.
    For example the column selection. Do not want users of the column Photo1. Because then the photo 1, 4, 7 are not shown.

    The column break actualy breeze your go see [url http://apex.oracle.com/pls/apex/f?p=VANBAREN_FORUM_TRY_OUT:FLUENTIR & c = VANBAREN] this example
    The report should be ordered on the family name and Department

    I've implemented for examples that shows grouped by Department employees where the number of employees next to each other depends on the room that is available.
    [url http://apex.oracle.com/pls/apex/f?p=VANBAREN_FORUM_TRY_OUT:FLUENTGENERIC & c = VANBAREN] The first uses a generic and breaking definend by the report model.
    [url http://apex.oracle.com/pls/apex/f?p=VANBAREN_FORUM_TRY_OUT:FLUENTNAMED & c = VANBAREN] The second one uses a named column model and uses the condition of models for breaking.

    This approach allows you to control not only on your go. You can display more information. It becomes possible screen time that the picture was taken under the photo by simply adding the column to the statement select source.
    And you have more control over the design, because decide you the used attributes and CSS classes.

    Nicolette

    Published by: Nicolette on 15-dec-2012 22:06
    Change the url of the demo application. After the alias of application not being not only more.

Maybe you are looking for