Javascript and JQuery examples

(3 posts) (2 voices)

Tags:

No tags yet.

  1. SteveD, Member

    Looking through the forums a number of features people ask for are answered with "This should be easy to do using Javascript or JQuery" - and that end's that particular thread. The problem is these are only easy to do using Javascript or JQuery if you actually know how to integrate Javascript or JQuery into MyDBR, certainly there appear to be no examples anywhere on the site.

    Two commonly requested features that are answered with the "It should be easy with Javascript" are for totals or calculated fields on filtered reports, and having totals display at the top of tables as opposed to the bottom.

    Are there any examples anywhere of how to use Javascript and or JQuery to achieve these, as it is only easy to do with Javascript if you already know how.

    Thanks in Advance

  2. myDBR Team, Key Master

    Steve,
    myDBR documentation does not cover JavaScript or jQuery as both of them are broad topics. jQuery is included in myDBR and we do take into consideration that JavaScript/jQuery can be utilized (adding additional classes, hooks, callback possibilities). Also, we do try to give examples of most common use cases where you can use JavaScript/jQuery.

    Having the summary calculation stay visible and to be updated when filtering is done is not yet supported. We will a take a look if this could be supported.

    To move the summary row to top, you can use:

    -- Give the resultset a class
    select 'dbr.resultclass', 'movesumrow'; -- To move:
    select 'dbr.javascript', '$("#dbr_rt1 .summary_row").last().insertBefore( $("#dbr_rt1 tbody tr:first") );';

    or if you want to have the summary both in bottom and top:

    select 'dbr.javascript', '$(".movesumrow").find("tbody").prepend( $(".movesumrow .summary_row").last().clone() );';

    --
    myDBR Team

  3. myDBR Team, Key Master

    FYI,
    the newest myDBR build contains updated column filter. In addition to aggregate calculation, you can also use comparision operators in filter:

    >10 - bigger than 10
    <10 - less than 10
    >=10 - bigger or equal than 10
    <=10 - less or equal than 10
    !=10 - not 10
    <>10 - not 10
    =ABC - Excactly 'ABC'

    See the demo.

    --
    myDBR Team


Reply

You must log in to post.