dbr.keepwithnext query

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

    Hi

    I've an issue with the dbr.keepwithnext command.

    I've created a simple procedure:

    select 'dbr.keepwithnext',20; select 'dbr.text', (select count(*) from hilmark.tblsalesinv_j a where year(a.tblSalesInv_Date) = YEAR(CURDATE()) AND MONTH(a.tblSalesInv_Date) = MONTH(CURDATE())), 'circle1'; select 'dbr.text', (select count(*) from hilmark.tblsalesinv_j a where year(a.tblSalesInv_Date) = YEAR(CURDATE()) AND MONTH(a.tblSalesInv_Date) = MONTH(CURDATE())), 'circle1';

    And I've also added a css entry in the user/userstyle.css file as follows:

    .circle1 { background: radial-gradient( circle, red, white); background-color: red; border: 2px solid white; border-radius: 50%; /* one half of ( (border * 2) + height + padding ) */ box-shadow: 1px 1px 1px black; color: white; font: bold 50px Helvetica, Verdana, Tahoma; height: 200px; width: 200px; margin: 40px; text-align: center; vertical-align: middle; display: table-cell; align-items: centre; }

    So what I'm doing is creating a couple of circle and placing the value returned from a query in the centre of the circle.

    When I don't use dbr.keepwithnext the circles are correct and the value is in the centre. However when I use dbr.keepwithnext the values are centred horizontally but vertically they are placed at the top edge of the circle.

    I wish to use dbr.keepwithnext to set the gap between the circles and control how many are placed side-by-side.

    Hope you follow that.

    Any thoughts?

    Jake

  2. myDBR Team, Key Master

    You can add

    line-height: 200px;

    to your circle1 class.

    --
    myDBR Team

  3. ajdjackson, Member

    Thanks - worked great

  4. ajdjackson, Member

    Hi

    I've gone a bit further with the above and need a bit of help.

    As I said above I wish to create a circle and put a value in it. This I can do with your help above.

    But I now wish to extend it above to be able to add a description with the returned value. I can do this with concat() but I would like to a the descriptor on a separate line. I've tried putting \n\r etc in the concat() statement but it didn't work.

    I've also tried creating 2 semi-circles and this works except I can't get rid of the line between them or the hover color change in each semicircle.

    Any thoughts on the best way to do what I wish? As you can see below I need to link a report of the values.

    Thanks

    Jake

    select 'dbr.keepwithnext',20; select 'dbr.hideheader'; select 'dbr.report','sp_DBR_Month_Test','[jake]','popup'; select 'dbr.hidecolumn',2; select 'dbr.cellclass', 'jake', 'cstyle'; select 'Sales' as '[jake]','semicircle1' as '[cstyle]' union select count(*) as '[jake]', 'semicircle2' as '[cstyle]' from hilmark.tblsalesinv_j a where year(a.tblSalesInv_Date) = YEAR(CURDATE()) AND MONTH(a.tblSalesInv_Date) = MONTH(CURDATE());

    and the css file has these entries:

    .semicircle1 { height:45px; width:90px; border-radius: 90px 90px 0 0; -moz-border-radius: 90px 90px 0 0; -webkit-border-radius: 90px 90px 0 0; background: green; text-align: center; vertical-align: middle; display: table-cell; align-items: centre; line-height: 22.5px; text-decoration:none; } .semicircle2 { height:45px; width:90px; border-radius: 0px 0px 90px 90px; -moz-border-radius: 0px 0px 90px 90px; -webkit-border-radius: 0px 0px 90px 90px; background: green; text-align: center; vertical-align: middle; display: table-cell; align-items: centre; line-height: 22.5px; text-decoration:none; } .semicircle1 a,a:hover { background-color: none; text-decoration: none; } .semicircle2 a,a:hover { background-color: none; text-decoration: none; }


Reply

You must log in to post.