dbr.report popup's title

(20 posts) (2 voices)

Tags:

No tags yet.

  1. ziuras, Member

    Hi,
    I need to show text in dbr.report popup title.
    How can i do this?
    i call:

    select 'dbr.report', 'sp_DBR_abc', '[cmdEdit]', 'popup', 'ina1=a1', 'ina2=a2', 'inA3<=A3', 'inA4<=A4', 'event=click', 'show_link=[Red]==1';

    I want to show in popup window title "Edit " + @A1 + "; " + @A2

    sp_DBR_abc have only "update Table set A3=A3, A4=A4 where A1=A1 and A2=A2; select 'dbr.refresh', 0;"

  2. myDBR Team, Key Master

    Enclose the title in quotation marks ("My title") and use it as a parameter for the dbr.report:

    select 'dbr.report', 'sp_DBR_abc', '[cmdEdit]', 'popup', 'ina1=a1', 'ina2=a2', 'inA3<=A3', 'inA4<=A4', 'event=click', 'show_link=[Red]==1',
    '"'+ "Edit " + @A1 + "; " + @A2 +'"'

    --
    myDBR Team

  3. ziuras, Member

    Thanks, but another one question:
    text in the title must be column from main select.
    i tried like this:
    'show_link=[Red]==1', '[txt]'
    and
    'show_link=[Red]==1', '"[txt]"'
    but its not work.

  4. myDBR Team, Key Master

    Can you show the actual code with the select?

    --
    myDB Team

  5. ziuras, Member

    this is not the real code but a simplified version:
    select 'dbr.report', 'sp_DBR_t1_Edit_All', '[cmdEditAll]', 'popup', 'in1=S1', 'in4<=N1', 'in5<=N2', 'event=click', 'show_link=[Editable]==1'; --Popup Title=[txtAll] select 'dbr.report', 'sp_DBR_t2_Edit_One', '[cmdEditOne]', 'popup', 'in1=S1', 'in2=S2', 'in4<=N1', 'in5<=N2', 'event=click', 'show_link=[Editable]==1'; --Popup Title=[txtOne]

    select 'dbr.crosstab', 'S2' select 'dbr.hidecolumn', txtAll, txtOne, Editable, N1, N2

    select S1, Editable, S1 + '...' as txtAll, case when Editable = 0 then '' else 'dbr.purehtml:<div class="i_edit"></div>' end as '[cmdEditAll]', S2, cast(N1 as char3) + '...' + cast(N2 as char(3)) as N12, N1, N2, S1 + S2 '...' as txtOne, case when Editable = 0 then '' else 'dbr.purehtml:<div class="i_edit"></div>' end as '[cmdEditOne]', from t1 order by S1, S2

  6. myDBR Team, Key Master

    Run the updater to get the latest build-

    The popup title parameter should have a format '"[txtOne]"', i.e., enclose the column reference in quotation marks.

    You might want to check the crosstab code. The reason for this is that you have a linked report attached to cmdEditAll column which is part of a crosstab header (S1, Editable and the txtAll). This This means that, based on the S2 column values coming from data, you have one or multiple crosstab data column sets (N12, N2, txtOne). Your linked report sp_DBR_t1_Edit_All makes reference to these values in data column sets, so it is unclear from which set the values should be fetched (myDBR defaults to the first one).

    --
    myDBR Team

  7. ziuras, Member

    after update i got:
    myDBR was not able to open a PHP session.

    Error message:

    Notice: Undefined index: httponly in /var/www/html/lib/utils.php on line 3457

    Notice: Array to string conversion in /var/www/html/lib/utils.php on line 3461

  8. ziuras, Member

    after restart mydbr machine i got:
    myDBR was not able to open a PHP session.

    Error message:

    Notice: Array to string conversion in /var/www/html/lib/utils.php on line 3461

  9. myDBR Team, Key Master

    Have you overridden the values from $mydbr_defaults['cookie'] in user/defaults.php?

    Sounds like you are missing entry $mydbr_defaults['cookie']['httponly'] which defaults to true.

    --
    myDBR Team

  10. ziuras, Member

    Yes i missed this line, but after add it is the same error. my /user/defaults.php:
    [php]
    <?php
    // This is used to override values in defaults.php at main level.

    $mydbr_defaults['page_title'] = 'myDBR Celsis';

    $mydbr_defaults['export']['pdf']['logo'] = 'companylogo.png';
    $mydbr_defaults['export']['pdf']['logo_width'] = 146;
    $mydbr_defaults['export']['wkhtmltopdf']['command'] = '/usr/local/bin/wkhtmltopdf';
    $mydbr_defaults['wkhtmltopdf']['tmp_directory'] = '/var/www/html/tmp';

    #2022-12-19 bandymas spresti konvertavimo i pdf problemas i 19vartus
    $mydbr_defaults['export']['wkhtmltopdf']['skip_version_check'] = array(
    'wkhtmltopdf_exists' => true,
    'wkhtmltopdf_version' => '0.12.6'
    );
    $mydbr_defaults['export']['excel']['lines_after_title'] = 0;

    $mydbr_defaults['db_connection']['pooled_connections'] = true;
    $mydbr_defaults['db_connection']['sql_server_init'] = 'SET ANSI_WARNINGS ON; SET ANSI_NULLS ON;';
    #$mydbr_defaults['db_connection']['sqlsrv_server_init'] = 'SET ANSI_WARNINGS ON; SET ANSI_NULLS ON;';
    $mydbr_defaults['db_connection']['sqlsrv_server_init'] = 'SET ANSI_WARNINGS ON;SET ARITHABORT OFF;SET ANSI_NULLS ON;SET QUOTED_IDENTIFIER OFF;';

    $mydbr_defaults['embed_url']['CURLOPT_SSL_VERIFYPEER'] = false;
    $mydbr_defaults['embed_url']['CURLOPT_SSL_VERIFYHOST'] = false;

    $mydbr_defaults['chart']['colors'] = [0xF43011, 0xF7D921, 0x5AB231, 0x3F90F4, 0xA05AE5, 0xF984A1, 0xDDE10A, 0xAEAEAE, 0xAFD8F8, 0x006F00, 0x0099FF, 0xFF66CC, 0x669966, 0x7C7CB4, 0xFF9933, 0x9900FF, 0x99FFCC, 0xCCCCFF, 0x669900, 0x1941A5];

    $mydbr_defaults['cookie']['httponly'] = true;

    /*
    Debug flag to determine server cookie problems.
    Enabling this may expose your database login information so use with caution
    $mydbr_defaults['debug_cookie'] = true;
    */

  11. myDBR Team, Key Master

    Try removing the existing cookie.

    if you do not have other $mydbr_defaults['cookie'] definitions in user/defaults.php, then you do not need the $mydbr_defaults['cookie']['httponly'] = true; line either.

    How did you update your myDBR installation? Is the mydbr/defaults.php the one that comes with the version or have you modified it?

    --
    myDBR Team

  12. ziuras, Member

    i updated from mydbr web, as allways.

    I add line in user/defaults.php:
    $mydbr_defaults['cookie'] = true;
    $mydbr_defaults['cookie']['httponly'] = true;

    but still got error.

  13. ziuras, Member

    html/defaults.php is today date. and size 35709
    i did not modified this file.

  14. ziuras, Member

    now i am restoring VM, i will try to update at night.

  15. myDBR Team, Key Master

    The defaults.php has $mydbr_defaults['cookie'] defined as an array. Now that you set the commands:

    $mydbr_defaults['cookie'] = true;
    $mydbr_defaults['cookie']['httponly'] = true;

    The first command changes the array to a boolean, and the second one changes it back to array with single value. This means that you lost all the other values from the original array. Remove both lines from your user/defaults.php and remove the cookie if present.

    --
    myDBR Team

  16. ziuras, Member

    I updated mydbr, cleared cookies. There are no lines in user/defaults.php :
    $mydbr_defaults['cookie'] = true;
    $mydbr_defaults['cookie']['httponly'] = true;
    But I still get the same error:
    myDBR was not able to open a PHP session.
    Error message:
    Notice: Array to string conversion in /var/www/html/lib/utils.php on line 3461
    in apache error.log:
    PHP Notice: Array to string conversion in /var/www/html/lib/utils.php on line 3461, referer: https://report.kmv.local/install/index.php?controller=update&action=update

    My programs on debian versions:
    php:7.0.33
    apache: 2.4.25

  17. myDBR Team, Key Master

    The problem is with the old PHP version.

    Do manual update and the problem will be fixed. See update instructions in the documentation.

    Would recommend updating the PHP unless you absolutely need the old version.
    --
    myDBR Team

  18. ziuras, Member

    i will try this night with manual update.

  19. ziuras, Member

    After manual update, its all ok, title of popup windows is working.
    I understand that with version php7.0 I will not be able to do automatic update? and i need to upgrade to php8.x

  20. myDBR Team, Key Master

    Automatic updates will function correctly in PHP 7.0. The issue was specific to a particular build.

    However, it's important to note that PHP 7.X has officially reached its End of life, and PHP 7.0 reached this milestone nearly five years ago. Consequently, it will no longer receive security patches. Therefore, we strongly recommend upgrading to latest PHP 8.2.

    --
    myDBR Team


Reply

You must log in to post.