Problem with colstyle

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

    I am re-working a report from a previous employee at my company and having some issues with formatting the correct column in the correct place.

    There are custom defined css styles that are referenced in a "dbr.colclass" select. Then there is a very long "rowclass" result.

    The problem is that I can't get the formatting to apply to a newly added field. Whenever I try to point the formatting query at the css style, the data element is done correct...but it shows up in the wrong place (right under the previous element rather than next to it.

    I'm a bit confused about how to apply the colclass to the correct data element when it's a part of a much larger query (there about 33 fields select and a full page of "if" statements that generates the formatting query).

    Any suggestions would be appreciated.

  2. myDBR Team, Key Master

    Could you tell what kind of formatting you are trying to define?

    If your report is formatting a column cell based on the content of the report, it is easier to use dbr.cellclass command to define the CSS class for each individual cell. dbr.cellclass command is a relatively new command and might not have been available when the report is originally created.

    myDBR Team

  3. thewah, Member

    The formatting is pretty basic. We have a defined variable criteria. The query then checks the data based on that criteria and either highlights the results in red or green and includes a .gif "x" or "check".

    What I'm not understanding is what portion of the formatting field (i.e. the field that defines what styles to be applied based on the query results) ties back to the actual column that needs formatting.

    There are currently 5 fields that get formatting based on the criteria. It doesn't seem to matter if there are extraneous parts of the formatting query or not (i.e there used to be 7 fields that were formatted, I removed two...the report works fine if all seven get formatting or if I comment out the two I removed...doesn't make a difference).

    Let me give the cellstyle change a shot, but if there's anything about formatting multiple fields based on different criteria in the same results set, I'd be interested in reading up on that, the current documentation is a bit sparse for doing multiple fields with different criteria.

  4. myDBR Team, Key Master

    see an example from demo how to use 'dbr.cellstyle'. If you want to use css class instead with dbr.cellclass (for easier maintenance) it works the same way.

    myDBR Team


You must log in to post.