dbr.rowstyle query

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

    Hi

    I'm attempting to do some conditional formatting in a crosstab.

    I have it working except for a border-bottom style - it only get applied to the leftmost columns before the 'crosstab' column. All the other styles are applied as designed.

    Here is what I'm using:

    select 'dbr.rowstyle','class'; ...... if (b.tblGroup_Cat_Desc in ('Gross Profit','Total Overheads','Net Profit/(Loss)'),'border-bottom-style:solid;border-color:black;background-color: #C5C6C9;font-weight:bold;color:blue;font-style:italic;','') as 'class'

    Any help most appreciated.

    Thanks

    Jake

  2. myDBR Team, Key Master

    The style should apply as defined. Cannot tell as your example does not show the full code.

    Most likely you have some other CSS which is overriding the border-bottom. A guess would be a border-top style from row below.

    --
    myDBR Team

  3. ajdjackson, Member

    Hi

    You are right. I had the following line preceding the dbr.rowstyle

    select 'dbr.colstyle','Val','[border-right-style:solid;border-right-width:thin;border-right-color:gray;width:75px]%0.0f;[border-right-style:solid;border-right-width:thin;border-right-color:gray;width:75px]-;[border-right-style:solid;border-right-width:thin;border-right-color:gray;width:75px;color:red;](%0.0f)';

    ie no bottom border.

    The thing I confused about is that I thought that styles were applied in the order that they appear in the code so why does the rowstyle css not over-ride/supplement the preceding css declaration?

    Cheers

    Jake

  4. myDBR Team, Key Master

    The order of the styles does not matter. It's the browser which decided how the conflicting styles are handled.

    Btw, you will be much better off if you use CSS classes to define the styles instead of using direct styles. Will make code maintenance much easier in the long run. Saves you typing as well.

    --
    myDBR Team


Reply

You must log in to post.