Refresh an inline report

(5 posts) (2 voices)
  • Started 11 months ago by ajdjackson
  • Latest reply from ajdjackson
  1. ajdjackson, Member

    Hi

    I thought this would be easy but I can't get it to work.

    I have an inline report that contains several small 'reports'.

    I need to be able to edit a value in one of these reports and have the whole inline report refresh.

    I've tried dbr.refresh in the sp that does the editing but instaed of refreshing the inline report I see dbr.refresh in the field that I have just edited although the values have been updated correctly.

    Thanks

    Jake

    Posted 11 months ago #
  2. myDBR Team, Key Master

    Jake,
    to the URL for the the inline report's can be found at the data-refreshurl-attribute. You can refresh the inline report's content by clicking programmatically the refresh button found in the inline report's start or by calling predefined inline_refresh() JavaScript function which takes any of the objects in the inline report as parameter.

    --
    myDBR Team

    Posted 11 months ago #
  3. ajdjackson, Member

    Hi

    Thanks for the above - I managed to get it to work by clicking the refresh button.

    I've a similar but different situation where I've got stuck.

    I've a simple report as follows:

    select 'dbr.css','ul.dbrlist.hlist li.list_no_link{font-weight:bold;color:#1254B8!important;}'; select 'dbr.report', 'sp_DBR_Schedule_Line_v2', 'line', 'inLine=Line'; select 'dbr.hidecolumn','Line'; select 'dbr.list', 'hlist';

    select if(Line = 0,"All Lines",concat("Line ",Line)), line as "[Line]" from line_tmp order by Line;

    select 'dbr.embed_object', 'line';

    As you can see by clicking one of the hlist list items I open a report below the hlist items.

    In this linked report I have two reports. In one of the reports there are editable and linked reports that update the data in the tables.
    I've all this working fine but what I would like to do to is refresh the linked report (sp_DBR_Schedule_Line_v2).
    I've tried using the dbr.refresh but that refreshes the primary report and I have to select the hlist item again.

    I don't know how to use the inline_refresh() - I've tried select 'dbr.javascript','inline_refresh("#line")'; but it does nothing and I'm not sure if that is the way to do it.

    Thanks for your help

    Jake

    Posted 11 months ago #
  4. myDBR Team, Key Master

    Jake,
    the inline_refresh is just for the inline reports.

    In case of list element, the easiest way to refresh is just to click the selected list item. The selected listitem has class "selected", so you do the refresh by clicking the link:

    $('.hlist li.selected a')[0].click()

    If you update to the latest build, you can also use dbr.resultclass to define a identification class for the list.

    --
    myDBR Team

    Posted 11 months ago #
  5. ajdjackson, Member

    Brill - thanks - worked great.

    Cheers

    Jake

    Posted 11 months ago #

Reply

You must log in to post.