Center a report button in a popup linked report

(8 posts) (2 voices)

Tags:

No tags yet.

  1. -nth-, Member

    I've got a linked report in a popup window that has a 'dbr.button' call at it's bottom. Currently that button is aligned to the left. I'd like it to be centered under the report. I'm not sure how to go about accomplishing this.

    I've tried a purehtml wrapper but it doesn't appear to help.


    select 'dbr.purehtml', '<table class="wrapper_table"><tr><td align="center">';
    SELECT 'dbr.report','sp_DBR_DeactivateSingleItem',
    'popup',
    'Item=1',
    'inValue=2';
    SELECT 'dbr.button', 'Yes';
    select ItemID as 'ItemID', 'YES'
    from Database..Table
    WHERE @ItemID = ItemID
    select 'dbr.purehtml', '</td></tr></table>';

    Thanks,
    -nth-

  2. myDBR Team, Key Master

    What is the purpose of the wrapper_table? It is causing the button to be aligned left.

    --
    myDBR Team

  3. -nth-, Member

    I don't need the wrapper table... I started without it, but then added it attempting to center the button. If I remove the wrapper, the button is still left aligned.

  4. myDBR Team, Key Master

    The button is centered by default. Do you have other dbr.purehtml in the report that might cause this?

    --
    myDBR Team

  5. -nth-, Member

    There are no purehtml statements in the main report, but there's a "sibling" linked report that does have a left aligned purehtml statement. I just tried turning that off too and it didn't make any difference. Would there be a default somewhere I may have inadvertently turned on to override all reports? Now that I'm thinking of it, as I look at any of my other reports that have buttons, they're all left aligned as well.

  6. myDBR Team, Key Master

    Sounds like you have overridden some CSS definition used by myDBR. Check your CSS what might be the one (one candidate would be the "content"-class.

    You can use browser inspector to see what definition causes the button to go left ("content"-classs would center it).

    --
    myDBR Team

  7. -nth-, Member

    When I do an "inspect element" in Chrome here's what I get for that popup window:
    <td><div class="popup_content" id="popup" style="height: auto; width: auto; "><table id="dbr_rtpopup1" class="dbrResultSet "> <tbody><tr><td class="lalign"><table id="dbr_rtpopup1tr1" class="dbrResultSet" style="margin-left:0px;"> <tbody><tr class="ReportOutRow0"> <td class="dbrPageViewCell1">ItemID:</td> <td id="dbr_rtpopup1tr1c1" class="ReportOutCell">ItemID</td> </tr> <tr class="ReportOutRow1"> <td class="dbrPageViewCell1">Date:</td> <td id="dbr_rtpopup1tr1c2" class="ReportOutCell">02/22/2012</td> </tr> <tr class="ReportOutRow0"> <td class="dbrPageViewCell1">Field3</td> <td id="dbr_rtpopup1tr1c3" class="ReportOutCell">Field3</td> </tr> <tr class="ReportOutRow1"> <td class="dbrPageViewCell1">Field4</td> <td id="dbr_rtpopup1tr1c4" class="ReportOutCell">Field4</td> </tr> <tr class="ReportOutRow0"> <td class="dbrPageViewCell1">Field5</td> <td id="dbr_rtpopup1tr1c5" class="ReportOutCell">Field5</td> </tr> </tbody></table> </td></tr> </tbody></table> <div class="comment ">De-activate item?</div><div class="bmmar ">Yes</div></div></td>

    Here's just the button:
    class="button" href="javascript:embed_element('popup','http://host/report.php?blahblah','',null);">Yes
    It also specifically says that the button inherits "td{text-align:left;}" from td in style.css. There is also a ".content{text-align:center;}" that's inherited from div.content, but it's crossed out, so I assume that the td declaration is overriding it.

    If I edit the main td definition, I see that it affects lots of things! :)

    Not sure what to do next...

    Thanks,
    -nth-

  8. myDBR Team, Key Master

    You can add following in userstyle.css:

    .mydbr_popupframe>tbody>tr>td {
    text-align: center;
    }

    --
    myDBR Team


Reply

You must log in to post.