Folders as favorites, report search

(6 posts) (2 voices)

Tags:

No tags yet.

  1. maron, Member

    Hi.

    It would increase the usability a lot if folders could be favorites.

    Also - if there could be a search feature for reports (you have access to) that would search in folders and subfolders, and allow for drag and drop to favorites folders - you would have a cleanup dream for Mydbr.

    We have over 300 reports - many of them redundant...

    Best regards,

    Maron

  2. myDBR Team, Key Master

    Having folders as favorites is an obvious choise. We'll add it.

    With the user-level search one would need to distinguish between directly executeable reports and linked only reports as you do not want to offer direct access to linked only reports. As for admin level search, one can easily create report for it (can provide samples if needed).

    --
    myDBR Team

  3. maron, Member

    Makes sense with the admin search. User-level search is probably not needed so much.

    If you have any hints on how I could locate reports with code in a similar way when I click on a link in the scheduler setup - this would be helpful.

    Maron

  4. myDBR Team, Key Master

    You can create a report for the search. For example a report for MySQL:

    CREATE PROCEDURE sp_DBR_find_report(in_search varchar(101))
    BEGIN select 'dbr.parameters.show'; select 'dbr.hidecolumns', 'folder_id';
    select 'dbr.url', 'index.php?a=editor', '', '[Name]', 'm=folder_id', 'r=report_id', 'show_link=[is_report]>0';
    select 'dbr.url', 'index.php?a=editor', '', '[Name]', 'proc=Name', 'show_link=[is_report]==0';
    select 'dbr.url', 'index.php', '', '[Location]', 'm=folder_id', 'highlight=report_id'; select r.name, ifnull(r.proc_name, p.SPECIFIC_NAME) as 'Name', fn_report_location(r.proc_name) as 'Location', p.created as 'Created at', r.folder_id, r.report_id, ifnull(r.report_id,0) as 'is_report'
    from information_schema.routines p
    left join mydbr_reports r on r.proc_name =p.routine_name
    where routine_definition like concat('%', in_search, '%' ) and p.routine_schema=database() and p.routine_name not like 'sp_MyDBR%'
    union
    select r.name, r.proc_name, fn_report_location(r.proc_name), p.created, r.folder_id, r.report_id, ifnull(r.report_id,0)
    from mydbr_reports r
    join information_schema.routines p on r.proc_name =p.routine_name and p.routine_schema=database()
    where r.proc_name = in_search; END

    With function:

    CREATE FUNCTION `fn_report_location`(in_procedure varchar(100)) RETURNS text CHARSET utf8
    BEGIN
    declare v_folder_id int;
    declare v_report_id int;
    declare v_folder_id_orig int;
    declare v_depth int;
    declare v_breadcrumb varchar(1024);
    declare v_foldername varchar(1024); set v_depth = 0; select r.folder_id, f.name, r.report_id into v_folder_id, v_breadcrumb, v_report_id
    from mydbr_reports r
    join mydbr_folders f on r.folder_id=f.folder_id
    where r.proc_name = in_procedure; set v_folder_id_orig = v_folder_id; while (v_depth!=1) do
    set v_depth = v_depth +1; select mother_id into v_folder_id
    from mydbr_folders
    where folder_id=v_folder_id; select name into v_foldername
    from mydbr_folders
    where folder_id=v_folder_id; if (v_foldername is not null) then
    select concat(v_foldername, ' → ', v_breadcrumb) into v_breadcrumb;
    end if;
    end while; return v_breadcrumb; END

  5. myDBR Team, Key Master

    Maron,
    with the most recent build, you can now add folders to favourites.

    --
    myDBR Team

  6. maron, Member

    Thank you - christmas cleaning ahead....


Reply

You must log in to post.