Please assist with the row style functionality

(2 posts) (2 voices)

Tags:

No tags yet.

  1. mitchbeatty, Member

    i have the following simple report

    DROP PROCEDURE IF EXISTS sp_DBR_DealerReport
    $$
    CREATE PROCEDURE `sp_DBR_DealerReport`()
    BEGIN

    SELECT dealers.name, programs.name, contracts.effective_date, contracts.program_name, contracts.agreement_number, contracts.vehicle_make, contracts.vehicle_model, contracts.vin, contracts.transmit_date, contracts.vehicle_mileage
    from tripac.contracts, tripac.dealers, tripac.programs
    where contracts.dealer_id = dealers.id and contracts.program_id = programs.id
    group by dealers.name, programs.name, contracts.effective_date, contracts.program_name, contracts.agreement_number, contracts.vehicle_make, contracts.vehicle_model, contracts.vin, contracts.transmit_date, contracts.vehicle_mileage;

    END
    $$

    Please show how to make the result rows with a blue background and white text

    I am having trouble understanding that the rowstyle is in a cloumn.

    Additionally how would one make every other row be blue with white text

    Your assistance would be much appreciated.

  2. myDBR Team, Key Master

    Hi,
    to make all rows blue/white, you define the CSS class for it and then assign that style to the result set:

    select 'dbr.css', '.blueresult td { background: blue; color: white}';
    select 'dbr.resultclass', 'blueresult'; select ...

    To make every other row blue with white text, you can override the default odd/even class in rows.

    select 'dbr.css', 'tr.odd td { background: blue; color: white}';

    With dbr.rowstyle / dbr.rowclass you can define styles for individual rows. For example setting background color to red for rows which exceed a threshold value:

    Rowstyle / rowclass example

    --
    myDBR Team


Reply

You must log in to post.