Help with custom Main Screens

(6 posts) (2 voices)
  1. ajdjackson, Member


    I've been trying to offer a different main page for users and I'm sort of stuck.

    Looking at your documentation I've tried the following:

    I created an sp in the mydbr schema

    CREATE PROCEDURE sp_mydbr_mainview_proc_get @inLogin varchar(30), @inAuth int as BEGIN

    if (@inLogin = 'myusername') begin select 272; end else begin select 240; end


    I then used server side files and added the following to defaults:

    $mydbr_defaults['mainview']['alternate_mainview_dispatcher_proc'], sp_mydbr_mainview_proc_get;

    $mydbr_defaults['mainview']['use_alternate'] = true;

    $mydbr_defaults['mainview']['cache_alternate'] = false;

    After those changes I received a HTTP ERROR 500 error - site doesn't load.

    I then commented out $mydbr_defaults['mainview']['alternate_mainview_dispatcher_proc'], sp_mydbr_mainview_proc_get; in the user/defaults.php file and the site loaded but it did not give me the alternate home page.

    Am I missing a step or something?



  2. myDBR Team, Key Master

    Instead of:

    $mydbr_defaults['mainview']['alternate_mainview_dispatcher_proc'], sp_mydbr_mainview_proc_get;

    you should set:

    $mydbr_defaults['mainview']['alternate_mainview_dispatcher_proc'] = "sp_mydbr_mainview_proc_get";

    (or just leave it out as 'sp_mydbr_mainview_proc_get' is the default).

    Note that the alternate homepage is loaded for the non-admin users. Admin can continue to access all myDBR features.

    myDBR Team

  3. ajdjackson, Member


    Thanks for the hint.

    I was testing as myself so as admin I was bypassed the custom page.

    Unfortunately this functionality wasn't quite what I expected.

    What I wish to do is to give users alternate home pages but with their usual report categories below.

    In essence what I wish to do is have conditional entries in the main_top.html file.



  4. myDBR Team, Key Master

    if you want to embed a report to main view's dashboard, see the "Customize the Top header/dashboard " section from the Customization section from the documentation. The alternate_mainview_dispatcher_proc redirects user to a full report.

    myDBR Team

  5. ajdjackson, Member


    Yes I already do that but I’d like to have a different home page for certain users/groups.

    I suppose I could do that via if else statements within the main_top embedded report although it could become quickly unmanageable that way.



  6. myDBR Team, Key Master

    You can apply exactly the same logic: check the username, user group, or any other condition you prefer, and then display the corresponding report to the user.

    if (@inLogin = 'myusername') begin exec sp_DBR_report_1() end else begin exec sp_DBR_report_2() end

    myDBR Team


You must log in to post.