Excel export Orange border

(5 posts) (2 voices)

Tags:

  1. shem, Member

    When I export to excel it produces an excel with an orange border around the column headers row.

    1) How can I change the color of the border ?

    2) Can I also change the font of the column headers to be bold?

    3) Should I presume that whatever commands I use to do that would be inside an IF?
    IF (inExportFormat = 'xlsx') THEN

  2. myDBR Team, Key Master

    1) How can I change the color of the border ?

    The Excel export border colors are defined in defaults.php. To change the colors to black, you can define in user/defaults.php:

    $mydbr_defaults['export']['excel']['style']['header']['border']['color']['rgb'] = '000000';
    $mydbr_defaults['export']['excel']['style']['header_top']['borders']['top']['color']['rgb'] = '000000';
    $mydbr_defaults['export']['excel']['style']['header_basic']['borders']['top']['color']['rgb'] = '000000';
    $mydbr_defaults['export']['excel']['style']['header_basic']['borders']['bottom']['color']['rgb'] = '000000';
    $mydbr_defaults['export']['excel']['style']['footer']['borders']['bottom']['color']['rgb'] = '000000';

    2) Should I presume that whatever commands I use to do that would be inside an IF?
    IF (inExportFormat = 'xlsx') THEN

    Commands in that IF-clause will only be executed in Excel exports.

    --
    myDBR Team

  3. shem, Member

    Thank you, it worked.

    What about changing the font of the column headers to be bold?
    I know that the following works:

        IF (inExportFormat = 'xlsx') THEN
    SELECT 'dbr.headerstyle', 'font-style: normal; font-weight: bold;';
    END IF;

    However, I would rather put in once in user/defaults.php instead of having to put it at the beginning of every report.
    I tried putting the following two lines in user/defaults.php, but it didn't work.

    $mydbr_defaults['export']['excel']['style']['header']['font']['bold'] = true;
    $mydbr_defaults['export']['excel']['style']['header']['font-weight'] = 'bold';

  4. myDBR Team, Key Master

    You can run the updater to get the latest build which has the headers in bold.

    --
    myBDR Team

  5. shem, Member

    Thank you very much.


Reply

You must log in to post.