Help with marquee

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

    Hi

    I'm trying to set up a ticker on the home page.

    I've got it working OK with static text but I would like to use data from a query such as value of sales today. I can't work out how to get data into the ticker.

    This is what I've done so far.

    In userstyle.css I've added the following:

    .marquee { height: 100px; overflow: hidden; position: relative; color:#0000FF; } .marquee p { position: absolute; width: 100%; height: 100%; margin: 0; line-height: 50px; text-align: center; /* Starting position */ -moz-transform:translateX(100%); -webkit-transform:translateX(100%); transform:translateX(100%); /* Apply animation to this element */ -moz-animation: scroll-left 15s linear infinite; -webkit-animation: scroll-left 15s linear infinite; animation: scroll-left 15s linear infinite; } /* Move it (define the animation) */ @-moz-keyframes scroll-left { 0% { -moz-transform: translateX(100%); } 100% { -moz-transform: translateX(-100%); } } @-webkit-keyframes scroll-left { 0% { -webkit-transform: translateX(100%); } 100% { -webkit-transform: translateX(-100%); } } @keyframes scroll-left { 0% { -moz-transform: translateX(100%); /* Browser bug fix */ -webkit-transform: translateX(100%); /* Browser bug fix */ transform: translateX(100%); } 100% { -moz-transform: translateX(-100%); /* Browser bug fix */ -webkit-transform: translateX(-100%); /* Browser bug fix */ transform: translateX(-100%); } }

    In my report I have this:

    declare test int;

    select count(t.PlotID) into test from hilmark.devc_import_log t where month(t.Updated) = month(now()) and year(t.Updated)= year(now()) and t.ChangeDesc = 'Fall Throughs' and length(t.OldVal) > 0 ;

    select 'dbr.html','<div class="marquee"><p><?php echo {$test}; ?></p></div>';

    Nothing displays.

    I've tried several things inside the div.

    Any help would be most appreciated.

    Jake

  2. myDBR Team, Key Master

    Hi,
    your test-variable is an SQL variable, not a PHP variable. You cannot use PHP tags in a report code either.

    Just use SQL to show the value:

    select 'dbr.html',  concat('<div class="marquee"><p>', test ,'</p></div>');

    --
    myDBR Team


Reply

You must log in to post.