Apply styles to multiple columns

(5 posts) (2 voices)

Tags:

No tags yet.

  1. maron, Member

    I have a few reports with multiple columns (over 10) containing financial data.

    I want to format all these columns the same for the report - any way to do one of the following:

    1. Apply a colstyle to multiple columns (similar syntax as dbr.sum)
    2.Apply a colstyle to all the columns or columns matching a regex
    3. Define colstyle for the whole report (applying to all tables in the report)
    4. Define colstyle for decimals globally (in Iceland we really do not need the extra digits, yet all accounting systems use decimals for numbers)

    Best regards,

    Maron

  2. myDBR Team, Key Master

    Maron,
    to understand the need, is this an Iceland specific formatting or formatting specific to your report? What is the generic formatting you would like to use?

    --
    myDBR Team

  3. maron, Member

    This applies in most countries where currencies generally do not use extra digits - it would be the same with JPY for example, but both Icelandic and Japanese coins < 1 are invalid.

    Generic formatting would be the priority, report / table based multi-column formatting would be a benefit.

    Few ideas

    Default decimal formatting style - in our case currency nr's are 90% of our nr columns...
    Report based formatting (select 'dbr.report.colstyle'....)
    Multi col formatting 'dbr.colstyle','*' or 'dbr.colstyle','*_isk' or similar as dbr.sum 'col1','col2','col3','style'

    Best regards,
    Maron

  4. myDBR Team, Key Master

    But you want to use decimal numbers (instead of integers) so that the summary would be correct when summing rows up?

    We can add option for default decimal places and add possibility to use multi col formatting.

    --
    myDBR Team

  5. myDBR Team, Key Master

    The newest build supports multi-column formatting so you can use commands like:

    select 'dbr.colstyle', 'col1', 'col2', 'col3', '%d';

    Also a new default $mydbr_defaults['formatting']['float_decimals'] allows for you to define how many decimals is shown on floats if no style is defined (default being 2).

    --
    myDBR Team


Reply

You must log in to post.