Right Alignment

(4 posts) (2 voices)
  1. Dev, Member

    Hi,

    I changed one column's format from number (e.g., 0.25) to percentage (e.g., 25%) by converting it into text. However, the right alignment isn’t working when I use the command:

    SELECT 'dbr.colclass', 'Loyalty Rate', 'right';

    How can I correctly change the alignment of the column using a command? Kindly any help on this.

    Thank you

  2. myDBR Team, Key Master

    Hi,
    instead of converting a number column to text, use the column style to format the column. This way myDBR knows the column is still a number and is able to offer you correct sorting and filtering.

    select 'dbr.colstyle', 'Percentage', '%d %';

    --
    myDBR Team

  3. Dev, Member

    Hi,

    The scenario I’m trying to clarify is not just related to percentages. In some cases, I’m also displaying counts (e.g., counting dates), and in such situations, I want to be able to right-align the column regardless of the data type.

    Thank you

  4. myDBR Team, Key Master

    You an right align a column with a style or with a CSS class

    You can do:

    select 'dbr.colstyle', 'column', '[text-align:right]';


    myDBR Team


Reply

You must log in to post.