dbr.header.tooltip in pageview

(11 posts) (3 voices)
  1. cris, Member

    Does dbr.header.tooltip work in pageview? It works fine on a normal table, but doesn't work for me in pageview. Maybe this is by design?

    Also, how does dbr.tooltip for an individual cell work? What is ColumnReferenceTo and ColumnReferenceFrom?

    Thank you.

    This works:
    select 'dbr.header.tooltip', 'a', 'This is a tooltip for A'; select 'a', 1 union select 'b', 2 union select 'c', 3;

    But this doesn't:
    select 'dbr.pageview'; select 'dbr.header.tooltip', 'a', 'This is a tooltip for A'; select 'a', 1;

  2. myDBR Team, Key Master

    Yes,
    for now tooltips are not supported in pageview. We'll add the support for it to the next builds.

    In the dbr.tooltip, the ColumnReferenceTo is the column where the tooltip is set and the ColumnReferenceFrom is the column where the tooltip content comes from.

    select 'dbr.tooltip', 'title', 'tooltip_col';
    
    select title, info as 'tooltip_col'
    from data;

    --
    myDBR Team

  3. myDBR Team, Key Master

    Cris,
    pageviews do now support tooltips. Additionally, tooltips can now include HTML code for formatted tooltips (even images).

    --
    myDBR Team

  4. cris, Member

    Thank you! I have a couple tooltips up and working in pageview, complete with HTML.

  5. duane, Member

    Hi. Can you clarify how the tooltip on a pageview report works?

    If I have a pageview report with 10 columns, how for each column do I indicate a tooltip?

  6. myDBR Team, Key Master

    Duane,
    tooltips (both header and cell tooltip) in pageview work exactly the same as in normal result set.

    For header you set the tooltip content directly (if you have multiple pageview sets (=rows)), they all share the same tooltip for the same column.

    select 'dbr.header.tooltip', 'a', 'This is a tooltip for A';
    select 'dbr.pageview'; select 'a', 1

    For the cell you can set different tooltip based on content so you give the destination and the source column references as parameter.

    select 'dbr.tooltip', 'title', 'tooltip_col';
    select 'dbr.pageview'; select title, info as 'tooltip_col'
    from data;

    --
    myDBR Team

  7. duane, Member

    So would this be the way to do it:


    select 'dbr.tooltip', 'ColumnNameA', 'tooltip_colA';
    select 'dbr.tooltip', 'ColumnNameB', 'tooltip_colB';
    select 'dbr.tooltip', 'ColumnNameC', 'tooltip_colC';
    select 'dbr.tooltip', 'ColumnNameD', 'tooltip_colD';
    select 'dbr.tooltip', 'ColumnNameE', 'tooltip_colE';
    select 'dbr.tooltip', 'ColumnNameF', 'tooltip_colF';
    select 'dbr.tooltip', 'ColumnNameG', 'tooltip_colG'; select 'dbr.pageview'; select
    'ColumnDataA' AS 'ColumnNameA', 'ColumnTipA' as 'tooltip_colA',
    'ColumnDataB' AS 'ColumnNameB', 'ColumnTipB' as 'tooltip_colB',
    'ColumnDataC' AS 'ColumnNameC', 'ColumnTipC' as 'tooltip_colC',
    'ColumnDataD' AS 'ColumnNameD', 'ColumnTipD' as 'tooltip_colD',
    'ColumnDataE' AS 'ColumnNameE', 'ColumnTipE' as 'tooltip_colE',
    'ColumnDataF' AS 'ColumnNameF', 'ColumnTipF' as 'tooltip_colF',
    'ColumnDataG' AS 'ColumnNameG', 'ColumnTipG' as 'tooltip_colG';

    (FYI: I've tried this and it works...)

  8. duane, Member

    Since right now it is only seen by hovering over the field, it would be great to be able to set the location ;-)

    e.g.:

    • hover (as now)
    • info icon beside label with hover
    • as test to the right of the field (no hover)

  9. duane, Member

    And a discovery:

    If you use number references for columns rather than name references, you have to increment the tool tip by 2 since there are double the columns. So the above example would need to be:


    select 'dbr.tooltip', 1, 'tooltip_colA';
    select 'dbr.tooltip', 3, 'tooltip_colB';
    select 'dbr.tooltip', 5, 'tooltip_colC';
    select 'dbr.tooltip', 7, 'tooltip_colD';
    select 'dbr.tooltip', 9, 'tooltip_colE';
    select 'dbr.tooltip', 11, 'tooltip_colF';
    select 'dbr.tooltip', 13, 'tooltip_colG'; select 'dbr.pageview'; select
    'ColumnDataA' AS 'ColumnNameA', 'ColumnTipA' as 'tooltip_colA',
    'ColumnDataB' AS 'ColumnNameB', 'ColumnTipB' as 'tooltip_colB',
    'ColumnDataC' AS 'ColumnNameC', 'ColumnTipC' as 'tooltip_colC',
    'ColumnDataD' AS 'ColumnNameD', 'ColumnTipD' as 'tooltip_colD',
    'ColumnDataE' AS 'ColumnNameE', 'ColumnTipE' as 'tooltip_colE',
    'ColumnDataF' AS 'ColumnNameF', 'ColumnTipF' as 'tooltip_colF',
    'ColumnDataG' AS 'ColumnNameG', 'ColumnTipG' as 'tooltip_colG';

    This also applies to other column number references (e.g. editable fields)

  10. myDBR Team, Key Master

    You can place the tooltip columns in the end of the query if you wish to use numeric references (so the columns shown to user are in consecutive order). The numeric references are not recommended practise nowadays. They do work, but are kepts mainly for compatibiity reasons as column references were not present in early versions of myDBR.

    Using column references makes the report much easier to maintain when queries change (adding columns in the middle).

    We can take a look if the tooltip could have options how to show it.

    --
    myDBR Team

  11. duane, Member

    I was using number (vs names) primarily to save me time. It was for a schema that was evolving and I wrote some functions to fetch the table schema from the mysql tables and generate the select statements for mydbr on-the-fly (and the update query) so that when the schema changed it just worked without editing dozens of queries.

    Using numbers saved me time as I didn't have to update them if the query changed! I can probably figure out a way to make it dynamic with names (vs numbers) but hadn't got there yet :-)


Reply

You must log in to post.