Move Total To First Column

(9 posts) (2 voices)
  1. nsepetys, Member

    Hello myDBR Team,

    I am trying to move the "Total" column of my crosstab to the first column (starting from the left). Is that possible out of the box? Or will that require some javascript?


  2. myDBR Team, Key Master

    you can use dbr.calc for this. Just leave out dbr.hsum and use (have a NULL first column named as 'Total'):

    select 'dbr.calc', 'Total', '[colref.hsum]';

    myDBR Team

  3. nsepetys, Member

    Cool. So I tried that on my end and I'm getting the following error- "Unknown column reference: paid.hsum]/[total"

    The query I have can be summed up in the following:
    SELECT 'dbr.crosstab', 'datevalue'; SELECT 'dbr.calc', 'value', '[paid.hsum]/[total.hsum]*100';

    SELECT username AS 'User Name[username]', NULL AS '[value]', date AS 'Date[datevalue]', paid AS 'paid', total AS 'total' FROM atable;

  4. myDBR Team, Key Master

    There was a problem with multiple hsum in calc. Should now be fixed. Run the updater and try again.

    myDBR Team

  5. nsepetys, Member


  6. nsepetys, Member

    We just updated to myDBR 4.6.4 (build 3017) and are getting the exact same error as before- "Unknown column reference: paid.hsum]/[total"

  7. myDBR Team, Key Master

    Build 3018 should work better. Could you re-run the updater.

    myDBR Team

  8. nsepetys, Member

    It doesn't seem like the hsum is working in the context I'm using it (see above). I did a test and it appears that, using the above query, we only get the first row's hsum for the crosstab table and every row beneath that hsum is the same as the first row. hsum works fine if I use the dbr.hsum command though.

  9. myDBR Team, Key Master

    Run the updater and it should now calculate correctly.

    myDBR Team


You must log in to post.