Wrting data right justified column

Hi
In my application I am using producer consumer loop architechture. In the consumer loop i am writn data from a queue to a file. I want to write data in a certain format to analyze in another program.   Now when i write dat to a file it writes left justified in six columns. I want it to write to file like the one i have attached. Can somebody tell me how?
Attachments:
data.PNG ‏53 KB

Ideally, you would just use a tab as delimiter and change the justification in the other program as needed. For example in MS word you can define how the tabs are justified.
If you want the data right justified in simple text displays (wordpad, notepad), you just need to ensure that the field width is sufficient for the widest data.
Try e.g. a format specifier of "%#15_6f' (and make sure that you use a fixed width font for display!)
Message Edited by altenbach on 10-08-2008 09:53 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
formatRight.png ‏15 KB

Similar Messages

  • How to get search help results in RIGHT-JUSTIFIED column

    I am writing a search help with search help exit. Therefore, I use a table lets say tabA. I don't need all fields of tabA but need some further fields which I fill during exit.
    tabA does not have currency or number fields.
    I need a currency field and use a char20 field of tabA instead. filling of this field and showing results is o.k., but of-course it is shown left-justified.
    I did not find any fields of shlp-fielddescr which sounds like left/centered/right-alignment. Another try was to fill char20 field with leading '_' signs - that looked terrible and was not right-justified either, because of not fixed-size font.
    Let's resume: there is no number or currency field which I can use. The shown results appear in a column of not fixed-size font.
    Any other idea?

    Hi, I have the same problem. Did you get to resolve it? . Thanks

  • Right-justify column name

    Hello Gurus
       I would like to right-justify the column heading. How can I do this? Specifically, this refers to the Quantity field in the Items assignment block in the Opportunities Overview screen.
    Regards,
    Sowmiya

    Try using LPAD like
    select lpad(object_name,30) from all_objects where rownum < 20;

  • How to make Hgrid number format data right justified.

    This code works fine for table numer format data formatting, but does not work on hgrid?
    OATableBean tableBean = (OATableBean) webBean.findIndexedChildRecursive("LoginHistoryVO11");
    tableBean.prepareForRendering(pageContext);
    DataObjectList ColumnFormat = (DataObjectList)tableBean.getColumnFormats();
    DictionaryData myColumnFormat = (DictionaryData)ColumnFormat.getItem(pageContext.findChildIndex(tableBean,"UserName1"));
    myColumnFormat.put(COLUMN_DATA_FORMAT_KEY ,NUMBER_FORMAT );
    any idea how to achieve this in hgrid?

    i m sorry, made a minor mistake its working....! :)

  • Right Justify a column in a JTable

    Hello,
    I formatted a decimal number and want to put it into a column in a JTable. Unfortunately, the value is being left justified. How do I make the data for the column right justitified?

    Thank you both for your answers. I had looked in the tutorial, but could not find the area for justifications. I did have a table model with a getColumnClass too, but didnt realize that I didnt have to use the actual data type's class to render the justification.
    Looking back at the tutorial, I now find that ImageIcon is supposed to be used for centering, but this didnt work. It wiped out the data for the column I tried to use it on rather than justifying it left or right. Any ideas how to get centering to work?

  • How to align Hgrid column(messagestyledtext) header text to right justified

    Hi All,
    I have a Hgrid table and i am using five columns in hgrid table.. I need to display column header text right justified. but by default it is left justified.
    Can any one tell me how to do it..
    Its very urgent.. Please help me out..
    Regards,
    Babu

    Use
    OAHGridBean GeneralHgrid=(OAHGridBean)webBean.findChildRecursive("<hgrid item name>");
    GeneralHgrid.prepareForRendering(pageContext);
    DataObjectList tableColumnFormats =GeneralHgrid.getColumnFormats();
    DictionaryData tableColumnFormat = (oracle.cabo.ui.data.DictionaryData)tableColumnFormats.getItem(pageContext.findChildIndex(GeneralHgrid, "<item id of item attached in hgrid column>"));
    tableColumnFormat.put(COLUMN_DATA_FORMAT_KEY, <enter format>);
    see below:
    �� TEXT_FORMAT (textFormat)- column content is Start justified.
    �� NUMBER_FORMAT (numberFormat)- column content is Right justified.
    �� ICON_BUTTON_FORMAT (iconButtonFormat)- column content is center justified.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Right-justify number columns in BC4J

    I have several JSP pages that I am using BC4J tags in. I want to right justify all dollar columns. In addition, I want some columns to have a default width regardless of the data in them. For instance, even if a column has 'Test' in it, I want it to have a display width of 50.
    How can I accomplish these two things?
    Thanks,
    Brett

    Sounds like you might want to add properties to the attributes in your VO. If you set up some properties to hold values for alignment and width for each column, you can just interogate these values when you render the JSP and writre them into the HTML.
    Matt

  • Right justified data into internal table

    **Hello Gurus,**
    I have an Internal table having data
    abc          10.00;   20.00    30.00
    def           20.00    00.00     40.00
    Total        30.00    20.00     70.00
    I want  to align my "Total" word to be right justified.
    and if the particular column is having "00.00"; amount it should not be display.
    and i want to bold the particular row only. i.e. my "Total" should be bold.
    can anybody help me to resolve this problem
    Thanks in adv.
    Kaustubh

    Hi Kaustubh,
    As Vijay said, you can specify your display conditions in ALV as the snippet shows...But, In fact u need not even populate the total field in the third row...
    While creating the field catalog, just assign 'X' to the do_sum option in the field catalog...then simply pass the internal table containing the first two records in to the REUSE_ALV* FMs and the ALV would sum these columns up and show the total in standard formatting...saves you a lot of code
    Eg. Lets say your fieldcatalog structure is wa_fieldcat and its table is it_fieldcat...u will need to do this while preparing the fcat...
      WA_FIELDCAT-FIELDNAME = 'WA_ITAB-COL1'.  --> the field u want to sum.
      WA_FIELDCAT-TABNAME = 'ITAB'.  --> Your Internal Table
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'WA_ITAB-COL2'.
      WA_FIELDCAT-TABNAME = 'ITAB'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    The FM would then generate the ALV with the columns summed up at the bottom. The best part is it takes care of the currency and quantity reference too...
    Hope it helps out...
    Regards...Jaison

  • Hello I have the Latest version of Adobe Lightroom 5 to date (8/26/14) however just recently when I open the develop tab I'm missing two options on the right side column "Lens correction" and "Effects"  I do not know I've hit some setting to remove those

    Hello I have the Latest version of Adobe Lightroom 5 to date (8/26/14) however just recently when I open the develop tab I'm missing two options on the right side column "Lens correction" and "Effects"  I do not know I've hit some setting to remove those options or if this latest version deleted those options?  Any help would be greatly appreciated and please excuse my ignorance :/

    Right click next to one of the other headers and you will get a pop-up to enable the missing ones.

  • DG4ODBC: STRING DATA, RIGHT TRUNCATION ERROR WHILE ACCESSING VARCHAR(MAX) COLUMN

    Problem Summary
    DG4ODBC: STRING DATA, RIGHT TRUNCATION ERROR WHILE ACCESSING VARCHAR(MAX) COLUMN
    Driver
    Microsoft® ODBC Driver 11 for SQL Server® - RedHat Linux
    Problem Description
    When selecting a MS SQL VARCHAR (max) column over a ODBC Gateway database connection I am getting this error from Oracle:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation {01004}
    [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation {01004}
    [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation {01004}
    [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation {01004}
    [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation {01004}
    ORA-02063: preceding 2 lines from <LINK_NAME>
    The ODBC driver should map the varchar(max) column to SQL_LONGVARCHAR which would be appropriate for Oracle but the column is getting truncated
    Issue
    By default the SQL Server ODBC driver exposes the varchar(max) data type as a SQL_VARCHAR. When reporting the maximum size of a varchar(max) column, the driver returns 0, which is the Microsoft convention for "unlimited".
      [ODBC][25518][1399527750.588980][SQLDescribeCol.c][497]
      Exit:[SQL_SUCCESS]                
      Column Name = [raw_response]                
      Data Type = 0x7fffe3cbe1a4 -> 12                
      Column Size = 0x7fffe3cbe158 -> 0                
      Decimal Digits = 0x7fffe3cbe1ac -> 0                
      Nullable = 0x7fffe3cbe1b0 -> 1
    DG4ODBC is unable to interpret a zero length as an "unlimited" size and returns an error when retrieving varchar(max) data.
    FreeTDS and DataDirect ODBC drivers  return SQL_LONGVARCHAR instead of SQL_VARCHAR with 0 precision. So there is no problem reported for these drivers.
    Is there a fix for this or is the Microsoft ODBC driver team working on a fix for the driver regarding varchar(max)?
    Regards,
    James

    Hi James,
    Thank you for your question. I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    If you have any feedback on our support, please click
    here.
    Regards, 
    Elvis Long
    TechNet Community Support

  • How do I align data within a column?

    In the newly updated Numbers (Mac), I cannot find how to align data within a column.

    The justify data select the column by clicking the column header (the letter at the top of the column) then open the formatter (top right):
    then select the "Text" formatter and select the type of aligment you want:

  • Sort options right justified in list view

    New to Maverick's, but I can't get my finder window to "stick" with the layout of the "sort options". My biggest beef is that I have the "Name" sort far left followed by "Date modified", etc.. yet every day in every new finder window, the 2nd sort jumps to right justified. I want this sort option to stick to the left alongside name. I use large monitors and scrolling over everytime to drag the sort modifier to the left is frustrating. Is there a solution?

    My guess would be the Images folder (Pictures in English) is designed to have the special, contextual grouping types.
    I don't know why they couldn't make them available in the dropdown menu, also, but they're not.
    I did a little testing and found if I called it Pictures unsorted, the options were available, but if I called the folder unsorted Pictures, they weren't.
    Try naming the folder starting with Images
    Edit: If I select the dimension and resolution column headers in the folder, then change the name of the folder, the columns are retained.

  • How can the numbers in numbered lists be right-justified?

    In numbered lists, the numbers are by default left-justified. Is there a way to make the numbers in a given list right-justified, so the periods line up? Is there a way to change the default?

    As a writer, I also need to be able to have the numbers in a list line up in an acceptable word processing way, so that the decimal points line up when you get to 2 digits.
    8.
    9.
    10.
    I do not want it to look like this.  I have had to work around by numbering a long list with alphabet letters.
    On another occasion, I created my list using 2 columns in numbers, where the numbers automatically right justify.  Then pasted it into my pages document.
    I don't want to have to do that.  AND I don't want to have to deal with tabs.  I should be able to handle this in Preferences, or Inspector, where I handle most everything else.    If I can, I can't figure it out, and there doesn't seem to be a help in the manual or Help menu.
    Perhaps I'm out of date and it is now proper to not have the decimal point line up????  Don't think so.
    Message was edited by: suzannefrombrooksville

  • How to show current date in a column of dimension table in ssas

    Hi,
    I have 2 dimension tables (ALLWORK and YOURWORK) and 1 measure table (STATS). In ALLWORK dim table, I have 4 columns, one of them is END_DATE. Based on END_DATE and current date I want to create a named calculation field. To achieve this, I
    want to show the current date in 5th column (of ALLWORK dim table) as calculated member (as named calculation wont show me correct date).
    Problem is, I am not able to create the column in the dimension table. While creating the calculated member, I am not able to select the ALLWORK dimension table, it always selects MEASURE by default. Please help.
    thanks
    Tarique
    thanks and regards Tarique Aslam

    Hi Tarique,
    According to your description, you want to add a column to your dimension to show the current date, right?
    In data source view, we can add named calculation to your table. A named calculation is a SQL expression represented as a calculated column. This expression appears and behaves as a column in the table. A named calculation lets you extend the relational
    schema of existing tables or views in a data source view without modifying the tables or views in the underlying data source.
    Reference
    http://msdn.microsoft.com/en-in/library/ms174859.aspx
    http://devmau5.wordpress.com/2010/03/25/the-getdate-of-mdx/
    If I have anything misunderstand, please point it out.
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to center the data in a column?

    Hi,
    I want all the data in a column to be centered rather than left-justified.
    How can we do this in SDK?
    Please see the picture which explains it all.
    Thanks
    Leon Lai

    Hi Maik,
    Thanks a lot for your reply.
    I was looking for kind of Excel Center Text.
    Too bad it cannot be done in SDK
    Thanks for your workaround.
    Well, as for the picture idea. I have just made another post on this topic. Hope you will have a look.
    Best Regards,
    Leon

Maybe you are looking for