[JS][CS2]How to distribute table column space evenly?

Script gurus help.
Is it possible to snap the table columns to the longest entry then the remaining space be distributed to each column evenly?

Yes, it is. Both column snapping and distributing space have been dealt with here in the past on a number of occasions. Searching the forum should turn up several useful approaches.
Peter

Similar Messages

  • How i pass table column  value to string variable or return to java applete

    Hi Master,
    How do I pass a table column value into string variable. See my code below:
    import java.sql.*;
    public class Waheed {
    public Waheed() {
    public static void main (String args [])
    String s = "9 23 45.4 56.7";
    System.out.println ("going for connection");
    // DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    try{
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:thin:@fahim:1521:aamir","muhammad","mfa786");
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("select accid from accbal");
    System.out.println ("going for connection");
    while (rset.next())
    s= rset.getString("accid"); this line give me error
    System.out.println (rset.getString("accid"));
    System.out.println (s);
    catch(Exception e){
    e.printStackTrace();
    This line give me an error:
    s= rset.getString("accid");
    s is string variable
    Plese give me an idea how I can pass accid in s variable.
    Thanks.
    Aamir

    See the code sample in the following thread (try using upeercase).
    JDBC  connection
    Kuassi

  • How to map table columns to xml attributes?

    With a table like this : Column1, Column2,...
    I try to obtain it :
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1" key="column1">
    <NAME>SMITH</NAME>
    </ROW>
    <ROW num="2" key="column1">
    <NAME>ALLEN</NAME>
    </ROW>
    </ROWSET>
    And i find this but it isn't enough :
    SELECT empno "@EMPNO", ename, job, hiredate
    FROM emp
    ORDER BY empno
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1" EMPNO="7369">
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <HIREDATE>12/17/1980 0:0:0</HIREDATE>
    </ROW>
    <ROW num="2" EMPNO="7499">
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <HIREDATE>2/20/1981 0:0:0</HIREDATE>
    </ROW>
    </ROWSET>
    how to known the column name?

    I do not know what columns you are talking about, but in HTML you can merge two columns with the attribute COLSPAN="2".
    DickDral

  • How to create table columns dynamically ?

    Hi All,
    I am working on an SSRS report that will show sales in the past 5 years. If the user selected to view sales of past 3 years he will only see 3 columns. so How can I create table columns dynamically at run time and how can I make sure that their dimensions
    will adjust to fit the report page size.

    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

  • How to format table column values to currency?

    All,
    I have bound a context attribute (type - string)  to a table column (TextView) which is used to display currency.
    It displays the value as 123456789.00
    How do I format the value as 123,456,789.00?
    Is there any FM available to format?
    I don't want to change the above context attribute type to CURR.
    Thanks
    Thruna

    >I don't want to change the above context attribute type to CURR.
    Why not?  That is the correct thing to do. That way you get formatting, sorting, even the correct decimal position and notation for different currencies and user settings.
    If you must go with string for the context attribute then I still assume your source data is type CURR.  When you 'move' this content into the string of the context attribute use the WRITE statement.  This will format the currency variable for output.

  • How to stop table columns widths from drifting

    I discovered that all the columns widths of my tables change on their own,
    leading me with tables of different columns widths where I wanted to
    maintain a strong cohesion of presentation among them.
    Here is a scenario to reproduce and understand the problem:
    • create a new Pages'08 document;
    • insert a Table;
       the 3 columns of this newly created table are 5.49 cm width each.
    Problematic case:
    • change the first column width with:<pre> Table > Table > Column Width > 5 cm</pre>   and hit return
    • the column width will switch to 5.01 cm
    • the 2 other columns widths will have switched to 5.50 cm.
    Is there a technique, I didn't find yet, to define a table column to a
    fixed value so that Pages'08 won't make it drift and wont touch to
    other columns width?
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

    Peter, Fruhulda, thank you for your analysis and confirmation.
    PeterBreis0807 wrote:
    daniel
    I have noticed the same thing and have given up on it.
    It's a mess.
    I can't say it more politely .
    Let Apple know:
    -> https://bugreport.apple.com/
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

  • How to Freeze Table/Column Header "without using additional scrollbars" ?

    hi people,
    I am hoping someone can help me here. I have a large table and would like to freeze the first row. Scrolling down the table "_*using the existing scrollbars*_" in the browser while ensuring the header rows are still visible (like Excel when you freeze panes). If you scroll to the right the header rows should stay frozen and not follow.
    I know there are other threads which talk about freezing table/column header, but my requirement is to have it "without using additional scrollbar".
    Thanks in advance,
    RAKESH

    Hi,
    there is no default key for this. You will have to code your own JavaScript for this. Also, I am not sure you want the column to be selected but a field in the column for the row you are in - correct ?
    Frank

  • How to achive table column header style (vertical text)?

    Hi,
    Can we show adf table column headers with vertical text, and with rotation. For eg. "Dept Id" lable should show up as similar to what the below HTML does:
    <html>
    <div style="float: left;
    position: relative;
    -moz-transform: rotate(1000deg); /* FF3.5+ */
    -o-transform: rotate(290deg); /* Opera 10.5 */
    -webkit-transform: rotate(290deg); /* Saf3.1+, Chrome */
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE6,IE7 */
    -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE8 */">Dept Id</div></html>
    Edited by: pramod gujjeti on Sep 18, 2011 8:51 PM
    Edited by: pramod gujjeti on Sep 18, 2011 8:51 PM

    Hi,
    I've used the below style classes in CSS, but still not getting the accurate Column Header Vertical Text. Also, in IE browser column header text is shrinked vertically when headerClass styles are applied!
    Any help appreciated!
    .sch af|column::column-header-cell {
    vertical-align: bottom;
    padding-bottom: 10px;
    height: 80px;
    .schc af|column::column-header-cell-content {
    -moz-transform: rotate(270deg);
    /* FF3.5+ */
    filter: progid: DXImageTransform.Microsoft.BasicImage(rotation=3);
    /*IE6,IE7*/
    -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
    /*IE8*/
    -o-transform: rotate(270deg);
    /*Opera 10.5*/
    -webkit-transform: rotate(270deg);
    /*Saf3.1+, Chrome*/
    position: relative;
    vertical-align: bottom;
    Edited by: pramod gujjeti on Sep 27, 2011 9:09 AM

  • How to hide table column based on country molga value

    Hi Experts,
    I am doing some enhancement in ess application. I want to hide table column based on country code i.e. Molga value.
    I want to hide coulm for only Japan country reset of them i need to be show those coulmn.
    Could you please provide me a sample code.
    Regards
    Chakri

    Hi Chakri,
    Your setting the table value that time you will get the Country Code.
    1.Create the attribute like Country_Column_Visible Data Type bind the com.sap.ide.webdynpro.uielementdefinitions.Visibility this value  you need to bind the table country column.
    2.In Table You need to check the country code Japan is available you need follow this below sample code.
    for(int i=0;i<tablesize;i++)
         tablesithValue=wdContext.nodeTable().getTablenode(i);
         if(null != tablesithValue.getcountrycode)
         if(tablesithValue.getcountrycode.equalsIgnoreCase("Japan"))
              wdContext.currentxxxxElement.setCountry_Column_Visible(WDVisibility.NONE);
         }else
              wdContext.currentxxxxElement.setCountry_Column_Visible(WDVisibility.VISIBLE);
    Use the above code you condition it will work.I hope it will help you.
    BR,
    Durga

  • How to get more column space in CR XI

    Hi All,
    What do i need to do in order to increase the work space in Crystal. My report has around 80 columns that needs to be fitted in one page.
    With my current settings I have MO Live Meeting document writer as a default printer but it can accomodate only 36" (width) of work space , that is about 50 columns.
    Pls let me know how can i increase the work space to have those 80 columns.
    Thanks

    Here is what I do when I need to do an extremely wide report (for a data extract for example...)
    #1) Go to Control Panel > Printer and Faxes
    #2) File > Server Properties
    #3) Place a check in the "Create a new form" box and enter a name for new page size.
    #4) In the lower section... "Form description (measurements)" set the width & height properties to whatever you need. (200in X 200in seems to be the max that virtual printers will knowledge.)
    I have a 200 X 200 that works with the Microsoft XPS Document Writer and Acrobat.
    HTH,
    Jason

  • How to format table columns in Forms 10g

    Hi Friends,
    I have payment table in the format
    col1 col2
    1 dell
    2 HP
    3 Compaq
    4 Acer
    i want to show this info in forms 10g
    Payment has to be made tomorrow- DELL,HP,Compaq,ACER

    Hi Francois,
    I have create the from based on that data block only but it is coming sequentially, for example
    Label - Payment for items tomorrow-Dell
    HP
    Acer
    Compaq
    But i need the same thing in
    Payment for items tomorrow- Dell,HP,Acer,Compaq
    please advice how i can make this, contect of the column should come with comma

  • How to make table column of the webdynpro application scrollable??

    Hi all,
    I want to make some columns of my table to be fixed and some to be scrollable...
    So if anybody know how to do it..
    Please do let me know...
    Thanks and regards..

    Shruti,
    If you are using NW 7.0 (NW04s) then check properties:
    -- Table.scrollableColCount
    -- Column.fixedPosition
    Both let you define number of of "fixed" columns at left/right and number of scrollable columns in between.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • How to refresh table column during button method call ?

    Hi,
    I have one table on my screen in which there are 5 rows.
    One of the column of this table is Status with initial value Not Completed.
    Now when I press submit button my 5 processes are started in for loop one by one.
    After completion of 1st process, I am updating 1st row status with Completed and vise a versa.
    But change is reflected on table after by method call over means if my submit action take 5 minutes to finish all 5 process than after 5 minutes, I can see all rows with status Completed while I want it to reflect as soon as I set its status.
    How can I do this ?
    regards,
    devang

    .. or break up the method in 5 methods (for each process a separate method) and with you button you call the first method. then when at the end of the method you call a javascript which updates the first column to completed and the js calls the second method (with queue of client event and serverListener) ... and so on and so on.
    Really not so cool idea but I think it's achievable:)

  • Oracle BI answers how to split table column?

    I have one issue and i don't know it is possible. If it is possible please tell me.
    In answer select cube's columns.
    result in table of answers
    --------------------------------|
    CUBE1 |
    --------------------------------|
    COL1 | COL2 | COL3 |
    --------------------------------|
    data1 | data2 | data3 |
    --------------------------------|
    I want to change like
    ---------------------------------------|
    NAME1 |
    ---------------------------------------|
    NAME2 | NAME3 |
    ---------------------------|
    NAME2 | NAME5 | NAME6 |
    ---------------------------------------|
    COL1 | COL2 | COL3 |
    ---------------------------------------|
    data1 | data2 | data3 |
    ----------------------------------------|
    help me

    Can somebody help on this please?

  • How to make table column with formula

    Hi all..
    This is my class
    public class MyNumber{
         private int num;
         public int getNum(){
              return num;
         public void setNum( int num){
              this.num = num;
    }Consider I design a table with FXML editor ( Scene Builder in this case )
    and these are some of my codes
    private TableView tab;
    private TableColumn<MyNumber, Integer> tabColInput;
    private TableColumn tabColOutput;
    tab.setEditable(true);
    tabColInput.setEditable(true);
    tabColInput.setCellValueFactory( new PropertyValueFactory<Person,Integer>("num") );
    tabColInput.setCellFactory(TextFieldTableCell.forTableColumn());
    tabColInput.setOnEditCommit(
        new EventHandler<CellEditEvent<MyNumber, Integer>>() {
            @Override
            public void handle(CellEditEvent<MyNumber, Integer> t) {
                ((MyNumber) t.getTableView().getItems().get(
                    t.getTablePosition().getRow())
                    ).setNum(t.getNewValue());
    );Problem:
    I want to make tabColOutput to always show the result for tabColInput times 2
    eg:
    When I change a row in tabColInput to 10, tabColOutput will show 20
    When I change a row in tabColInput to 3, tabColOutput will show 6
    Could anyone advice me how to do this?
    Ps: I am not english native speaker, so I am sorry if I am saying it wrong ^^

    I just give it a try and it works like magic
    Here is how I do it (change a cell from a table by code)
    import java.util.ArrayList;
    import java.util.List;
    import javafx.application.Application;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.geometry.Insets;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.layout.VBox;
    import javafx.scene.text.Font;
    import javafx.stage.Stage;
    public class TableViewSample extends Application {
        public static final String Column1MapKey = "A";
        public static final String Column2MapKey = "B";
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(Stage stage) {
            List<MyTableData> listData = new ArrayList<MyTableData>();
            listData.add(new MyTableData("A", 21) );
            listData.add(new MyTableData("B", 24) );
            listData.add(new MyTableData("C", 23) );
            listData.add(new MyTableData("D", 21) );
            listData.add(new MyTableData("E", 22) );
            ObservableList<MyTableData> tableData = FXCollections.observableArrayList(listData);
            Scene scene = new Scene(new Group());
            stage.setTitle("Table View Sample");
            stage.setWidth(300);
            stage.setHeight(500);
            final Label label = new Label("Student IDs");
            label.setFont(new Font("Arial", 20));
            TableColumn<MyTableData, String> firstDataColumn = new TableColumn<MyTableData, String>("NAME");
            TableColumn<MyTableData, Integer> secondDataColumn = new TableColumn<MyTableData, Integer>("AGE");
            firstDataColumn.setCellValueFactory(new PropertyValueFactory<MyTableData, String>("name"));
    //        firstDataColumn.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<MyTableData, String>, ObservableValue<String>>(){
    //            @Override
    //            public ObservableValue<String> call(CellDataFeatures<MyTableData, String> p) {
    //                return p.getValue().nameProperty();
            firstDataColumn.setMinWidth(130);
            secondDataColumn.setCellValueFactory(new PropertyValueFactory<MyTableData, Integer>("age"));
            secondDataColumn.setMinWidth(130);
            TableView<MyTableData> table_view = new TableView<MyTableData>();
            table_view.setItems(tableData);
            table_view.getColumns().setAll(firstDataColumn, secondDataColumn);
            final VBox vbox = new VBox();
            vbox.setSpacing(5);
            vbox.setPadding(new Insets(10, 0, 0, 10));
            vbox.getChildren().addAll(label, table_view);
            ((Group) scene.getRoot()).getChildren().addAll(vbox);
            stage.setScene(scene);
            stage.show();
            //(this is where I change my table content with code)
            tableData.get(0).setName("xx Gargoyle xx");
            System.out.println("Testing Done");
    import javafx.beans.property.SimpleStringProperty;
    import javafx.beans.property.StringProperty;
    public class MyTableData{
        private final SimpleStringProperty name;
        private int age;
        public MyTableData(String name, int age) {
            this.name = new SimpleStringProperty(name);
            this.age = age;
        public String getName() {
            return name.get();
        public StringProperty nameProperty(){
            return name;
        public void setName(String name) {
            this.name.set(name);
        public int getAge() {
            return age;
        public void setAge(int age) {
            this.age = age;
    }And thank you very much

Maybe you are looking for