Table numbers in a column to Right alignment

Hi All,
I have a table like the below.
Age (Years)
1985
1998
2007
1–4
52
35
29
5–14
26
20
15
15–24
102
82
80
25–44
167
161
144
45–64
875
680
661
65–74
2,848
2,495
2,059
75–84
6,399
5,703
5,164
Over 85
15,224
15,111
12,947
I want to decimal align the 2nd,3rd,4th column using javascript.
Paginators are manullay using tab stops and adjusting the "Align to Decimal Tab"
But I want to do it in javascript
Help me...

Hi, Maheshwara:
  Your question's a bit confusing, because your example does not show any decimal points! Perhaps it would be good for you to show a screenshot from InDesign with Hidden Characters enabled and the Tab ruler visible so we can see what is going on.
What do you want to do, though? My guess is you want to right-align the text, then go through and find the entry with the most characters to the right of a decimal point and set a decimal tab based on that entry, and apply it to the entire column. Sounds pretty easy!
Are you stuck? What's the problem? How far have you gotten? Do you know Javascript?

Similar Messages

  • Column's Right Alignment goes out with CR in format Mask like NNN,NN0.00CR

    I am working in Reports 6i. For a numeric calculated column, I give format mask NNNN,NNN,NNN,NN0.00CR. Due to CR, right alignment of the column goes out. That is rows for which CR is NOT printer are also aligned at right. A blank space should be left at the end of every row when no CR is printer. In this way numeric data is right aligned and readability is not disturbed.
    Pl. help.
    Thanks in anticipation.

    I am working in Reports 6i. For a numeric calculated column, I give format mask NNNN,NNN,NNN,NN0.00CR. Due to CR, right alignment of the column goes out. That is rows for which CR is NOT printer are also aligned at right. A blank space should be left at the end of every row when no CR is printer. In this way numeric data is right aligned and readability is not disturbed.
    Pl. help.
    Thanks in anticipation.
    Muhammad,
    I tried this on 6.0.8.14.2 version of Reports 6i and it aligned properly (i.e., spaces where present for those values without CR). I originally had the Arial font which as you know is not a fixed font and in this case, the spacing was not exact. I switched to Courier and the output was much more readable for the numeric values, especially with the spacing.
    Regards,
    Jim Safcik
    Thanks Jim Safcik. I changed the font of that column to Courier and it resolved the problem. But I am using Times New Roman font which creates above alignment problem.
    It would be nice if we have an other solution which is NOT font dependent.
    However I appreciate your guidance and knowledge.
    Pl. guide.
    Thanks.

  • Need Amount column to be Right Aligned in LOV asap

    Hi,
    I have a amount column in a custom LOV which needs to be right aligned. but in LOV, by default all columns come as left aligned..Pls provide a solution asap.
    Thanks,
    Puneet

    The column alignment depends on the type of data it displaying. Number columns are right aligned and string column are left aligned. this is default behaviour.
    Change datatype of column amount to Number. It will allign right.
    Thanks,
    Ram

  • Right align all numbers in table of contents

    One of the entries in my table of contents has the page number right beside the entry. The rest of the page numbers are right aligned.
    When I "Show Invisibles", an arrow is in the single space between the entry and the page number. For the remaining entries, it is in the middle of the page.
    I've tried redoing the heading on the page in question about 100 times. I cannot figure out what is different about that heading that is screwing the ToC up.
    Thanks.

    Hey
    I'm really struggling with my pages as I have created a table of contents for iWork09 but it's defaulted for the pages numbers to sit directly after the chapter rather than face the opposing side like your picture shows. I tried changing the tabs and then the text layout from left to across the page but all it does it push the numbering to the next line (for the longer titles) and push the numbers across (for the shorter named titles). I can't even get the lines to appear so that the chapter title appears, then some dots leading to the number. Any ideas?

  • Need Number fields to be right aligned in ADF table.

    Hi All,
    I have af:outputtext in the column of ADF read only table and view attribute which is associated to this field is fetching numbers (type is Number). But by default in my page data (numbers) is displaying with left aligned.
    But my requirement is to display numbers to be right aligned. I tried by setting Horizontal property to 'right' (text-align = right), also tried by seeting Styledclass property to AFFieldNumberMarker / AFFieldNumber css properties. But still numbers are displaying with left aligned.
    Please tell me how to fix this issue?
    Thanks,
    Sadanand

    Hi,
    try attribute align="right" in af:column....
    Regards,
    Suganth.G

  • How can i open a PDF bank statement in numbers so that the rows and columns contain properly aligned data from statement?

    how can i open a PDF bank statement in "numbers" so that the rows and columns contain properly aligned data from statement?

    Numbers can store pdfs pages or clippings but does not directly open pdf files.  To get the bank statement into Numbers as a table I would open the bank statment in Preview (or Skim) or some pdf viewer.
    Then hold the option key while selecting a column of data.
    Then copy
    Then switch to numbers and paste the column into a table
    Then repeat for the other columns in the pdf document
    It would be easier (in my opinion) to download the QFX or CSV version from your bank

  • How can I right-align a table header?

    Does anyone know a way to right-align a table header?
    For example, in the table below I want the word 'Price' to be right-aligned. I could set the table's 'header renderer' to be a right-aligned DefaultTableCellRenderer, but then the header would look like a cell, not a header. Why can't swing be simple, like table.getColumn(1).setAlignment(Column.RIGHT) ????
    public class TestTableHeader {
         public static void main(String[] args) throws Exception {
              JFrame frame = new JFrame("Test");
              Object[][] rowData = new Object[][] { { "General Electric", "$100.60" },
                        { "IBM", "$5.20" }, { "Wal-mart", "$17.00" } };
              JTable table = new JTable(rowData, new Object[] { "Name", "Price" });
              DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
              renderer.setHorizontalAlignment(DefaultTableCellRenderer.RIGHT);
              table.getColumnModel().getColumn(1).setCellRenderer(renderer);
              frame.getContentPane().add(new JScrollPane(table));
              frame.setSize(400, 300);
              frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              frame.setVisible(true);
    }

    I modified your code an came up with a solution to the problem.
    import java.awt.Component;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.DefaultTableCellRenderer;
    public class TestTableHeader {     
         public static void main(String[] args) throws Exception {
              JFrame frame = new JFrame("Test");
              Object[][] rowData = new Object[][] {
                        { "General Electric", "$100.60" }, { "IBM", "$5.20" },
                        { "Wal-mart", "$17.00" } };
              JTable table = new JTable(rowData, new Object[] { "Name", "Price" });
              RightAlignRender right = new TestTableHeader().new RightAlignRender();
              table.getColumnModel().getColumn(0).setHeaderRenderer(right);
              table.getColumnModel().getColumn(1).setHeaderRenderer(right);
              frame.getContentPane().add(new JScrollPane(table));
              frame.setSize(400, 300);
              frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              frame.setVisible(true);
         public class RightAlignRender extends DefaultTableCellRenderer {
              public Component getTableCellRendererComponent(JTable table,
                        Object arg1, boolean arg2, boolean arg3, int arg4, int column) {
                   Component toReturn = table.getTableHeader().getDefaultRenderer().getTableCellRendererComponent(table,
                             arg1, arg2, arg3, arg4, column);
                   switch (column) {
                   case 0:
                        ((JLabel) toReturn).setHorizontalAlignment(DefaultTableCellRenderer.CENTER);
                        break;
                   case 1:
                        ((JLabel) toReturn).setHorizontalAlignment(DefaultTableCellRenderer.RIGHT);
                        break;
                   return toReturn;
    }

  • JTables - Right Aligning certain columns

    Hi!
    Im having a major problem! I am using JTable in my prog, but Im finding them very difficult to customise. I am wanting my JTable to have certain Columns(for monetary values) right aligned, as this looks far better when dealing with currency. I have tried implementing this class on my JTable:
    package accpick.overrides;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    class MyRenderer implements TableCellRenderer
         TableCellRenderer old_renderer;
         MyRenderer(TableCellRenderer old_renderer)     
              this.old_renderer = old_renderer;
         public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column     )     
         // use the old renderer to render the cell          
         Component c = old_renderer.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
         if(column == 3||column == 4||column == 6)          
              //align right
         // set all other cells to normal          
         else          
              //align left
         return c;
    The problem with this is that getTableCellRendererComponent() returns a Component, and Component does not seem to have a method to align, but JComponent does(setAlignmentX())
    Please can someone help!!!Am i on the right track or am i going about it totally the wrong way?
    THanks
    Nitron999

    Thanks everyone! Your advice got me past the compiler! But Im still having the problem of right aligning the columns! Was my code on the right path, or am i farting in the wind here?
    Does anyone know of any relatively well structured way of doing this?

  • Right align page numbers that are to the left of TOC entries

    I posted a similar question about a year ago that I believe Harbs or Peter answered, but darned if I can find the thread. At that time they provided a script that did a GREP search, finding a sentence that starts with a digit and replacing it with a tab. I still have the script, but for some reason it is not working correctly with my new TOC layout.It should insert a tab to the left of the page number (page numbers are to the left of the TOC entries), and force the numbers to right align so that a single digit page number right aligns with the right edge of a double-digit page number.
    Find: ^(\d+)
    Change to: \t$1
    What happens in the new TOC is the script finds a digit and inserts a tab to the left of the page number. The page numbers move to the right, but they don't right align. They are further to the right, but they numbers themselves are still left aligned.
    I'm mystified as to why the script doesn't work on this new layout. I'm using CS4 now, and it still works on the old layout. There is nothing terribly different about the new layout except that the column is much narrower, and there are several threaded colums in the TOC instead of one long column, and the chapter titles don't have page numbers (but all other entries do have page numbers.)

    Peter,
    Thanks for your reply. Between the page number and the entry is an en-space.
    I started with these settings:
    I then changed the left aligned tab to a right aligned tab:
    But still no luck.

  • Add additional DESC column at right side of pivot table in bi publisher

    ARABIC DESC
    India
    UAE
    Total
    English DESC
    QUANT_DECIMAL
    VALUE_DHS
    QUANT_DECIMAL
    VALUE_DHS
    QUANT_DECIMAL
    VALUE_DHS
    0
    0
    0
    0
    0
    0
    اجر
    4
    4
    23
    5619
    27
    5623
    ABC
    اجر
    0
    0
    10
    3510
    10
    3510
    CDF
    ملابس
    0
    0
    14
    772
    14
    772
    XYX
    جالية
    0
    0
    25
    2020
    25
    2020
    EJB
    Total
    4
    4
    72
    11921
    76
    11925
    please help me to add another column at right side of pivot table as marked in blue.
    1st column indicates in arabic desc and my client want english desc at right side of pivot table
    country is group by as INdia and UAE.
    Please help me to display the above report in pivot table in BI Publisher;
    Thanks
    Naveen

    Naveen,
    Do you have that column in the database?
    Thanks,
    Sasi Nagireddy..

  • Right alignment for OO tree column

    Hi experts,
    how can i align the data of type characters in the OO tree alv display? i want to align it to the right.
    Thanks.

    Hello,
    Set Alignment of the Text in the Column
    You are able to set where the content of a column will be put:
    ·        Left aligned
    ·        Centered
    ·        Right-aligned
    You are able to change the alignment of text in the design object (header and footer area of page or list) and in the ALV output.
    Use the method CL_SALV_COLUMN SET_ALIGNMENT
    Check
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm

  • How to set Right Alignment for a JTable column

    Hi,
    I am using a JTable for displaying database records using AbstractTableModel. It works fine. But, for the numeric fields I want to make records right aligned using setHorizontalAlignment. I tested with TableColumn.setHorizontalAlignment but it ends up with an error. Is there a solution? Please help me. Thanks in advance.
    bhuvana.

    In you table cell renderer you can specify the alignment of the text.
    public class MyTableCellRenderer extends JLabel implements TableCellRenderer
    public MyTableCellRenderer
    setOpaque(true);
    setBackground(Color.white);
    public Component getTable.....(JTable table,Object value,......) //fill all these things
    setFont(table.getFont());
    if(value instanceof Float)
    setHorizontalAlignment(SwingConstants.RIGHT);
    setText(value);
    return this;
    This would set all the Floats to RIGHT alignment.
    Thanks,
    Kalyan

  • How do I Right-align TOC numbers if they're not

    Hello, i'm talking from Italy.
    I've a little question about TOC.
    I wrote my thesis for my degree, placing the TOC at page 5. Since this... no problems.
    Right now i finished writing and wanted to update the TOC. But... surprise... the page numbers doesn't right align as i would!!!
    I'd like to have this,
    | Title ...................1 |
    | Subtitle............2 |
    | Subtitle............6 |
    | Title..................19 |
    | Subtitle..........22 |
    ( Even without dots if it's not possible. The numbers should be aligned but here you can't see this. )
    But... i have this!!!
    | Title 1 |
    | Subtitle2 |
    | Subtitle6 |
    | Title19 |
    | Subtitle22 |
    it's such a DISASTER!
    Can i solve this problem? My university requires page numbers.
    Thank you.
    Message was edited by: giggionline

    Select the TOC by clicking in it. It will help you if you have Show invisibles on.
    Now you can align the number by pulling the small blue triangle on the ruler.
    !http://img686.imageshack.us/img686/7861/tocp.jpg!
    Now open the Inspector > T tab > Tabs > click on Leader button> choose leader

  • Right-align footnote numbers

    Is there a way to right-align footnote numbers so that they will align like this:
      1. Text of footnote
    12. Text of footnote
    123. Text of footnote
    instead of like this (an abomination):
    1.   Text of footnote
    12.  Text of footnote
    123. Text of footnote
    The obvious way would seem to be to add a tab as prefix (in Document Footnote Options|Numbering and Formatting) and set the tab as right-aligned in the paragaph style, but the dialog will not accept a tab (^t).
    I can't see any way to set the alignment in the para style options either.
    At the moment I use three paragraph styles Fn #, Fn ## and Fn ### with varying indents, but it’s cumbersome and unreliable having to reassign styles when footnotes are added or deleted.

    In 2006-2007 I converted 32 publications from Ventura to InDesign. From 200 pages to 3,200 pages. I feel your pain. Ventura was a crazy program. I was updating things in Ventura. I'd save it and go home and then the next day half the book (not the changes just literally half the text from the book) had disappeared. Gone. So frustrating.
    Regarding indexing:
    We outsourced our indexing to an indexer, we just gave him/her a pdf of the book and we a got an index back.
    Similar to yourself, it has cases and statutes in all the books. So I've never really used the indexing feature, I have ledt that to a pro indexer. Hopefully someone else can you point you on that.
    But if you need any more help converting from Ventura to InDesign let me know. I did a lot of automating of the books, chapter numbers, pages, numbered paragraphs, TOCs etc.
    My proudest moment was using GREP to apply styles to the 3,200 page book. I opened all the chapters and applied master pages with variables for running heads (as they changed each page (cs3 came along just at the right time ). I then proceeded to GREP find and replace millions of text across literally thousands of pages. I applied all the styles to all the text in the right places in 2 days. It then took me 2 weeks to proofread my new document. Which had a few hic-ups but sorted quite easily.
    So hopefully my little success story will inspire you some how.

  • Right Align the Currency values in ALV report

    Hi Friends,
    I have developed a report and displayed the output using the ALV. I have columns for currency values in the output table.
    The fields for currency values are character fields. The values in the table for display, is properly right aligned (default for currency values). But in the output, the currency values are left aligned.
    Since I need blank lines in the output table after each entry, I have used the character fields in the output table so that I can clear them and append it to get the blank line.
    Please suggest me to get the currency values right aligned.
    Thanks in advance.

    try with this field in field catalog.
             just(1)        type c,        " (R)ight (L)eft (C)ent.
    for the currency field add this field too in field catalog. it will work.

Maybe you are looking for

  • Display of row index in table footer

    Hi, Row no of first row is generally displayed in the footer of the table as Row <first row rowno> of <total no of rows>.Eg Row 1 of 10. Can this be changed to display row no of currently selected row insted of first row? Thanks in advance, Apurva.

  • SAP NW 7.0 Java trial version on windows platform

    Hi, I am searching for a SAP NW 7.0 Java trial version on windows platform in the "Downloads" sessions. But I couldn't find it there. Can anybody help me finding this trial version? Thanks, Kris

  • I grab a null frame.  Can a Java genious help, please?

    Hello. I am a high school student working on a science fair project. Right now I am using JMF to grab a frame from my ATI TV Wonder USB. The code below accesses the TV Wonder but it seems like I get a null frame because I have put a if statement in t

  • How to create a blank option in fields in web apps

    HI. We have created a pretty simple webapp that lists all our teachers. One of the fields we created was a list of states drop down menu. Is there any way in the list to create a blank field - say there is no state for that person? Right now it shows

  • Deactivating region (taskflow) when changing showDetailItem in panelTabbed

    Jdev 11.1.1.4 I have a JSF page with a af:panelTabbed wiith two af:showDetailItem In every af:showDetailItem I have a region mapping to the same task flow in both regions (in order to reuse). The taskflow has to main steps: First one method call init