Crosstab Formatting Query

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

    Hi

    Hopefully an easy one :)

    I've created a report that contains 2 crosstab reports.

    I wish to use a specific format only on the second row in the second crosstab.

    I've tried this: select 'dbr.css', 'tr:nth-child(2) {background: gray}'; but this gets applied to both the crosstabs.

    I've also tried putting #tab_dbr_rt2 in various positions in the above but with no success.

    Thanks for your help

    Jake

  2. ajdjackson, Member

    Hi

    Almost sorted it ;)

    select 'dbr.css', '#dbr_rt2 tr:nth-child(2) {background: gray}'; works but it also formats the crosstab header row as well:(

    Any thoughts?

    Cheers

    Jake

  3. myDBR Team, Key Master

    First, give the result set (table) a class which will help you to differentiate the exact result set from other tables:

    select 'dbr.resultclass', 'mytable';

    (Using #dbr_rt2 works also, but makes maintaining the reports harder as it is easy to break the rule if you happen to insert another result set in the report.)

    Then apply the CSS rule to this table's second row in table body (actual data rows):

    select 'dbr.css', '.mytable tbody>tr:nth-child(2) {background: gray}';

    --
    myDBR Team

  4. ajdjackson, Member

    Cheers - you're a star!

    Jake


Reply

You must log in to post.