Layered popup reports?

(11 posts) (2 voices)

Tags:

  1. -nth-, Member

    Is there a way to do layered popups? I've got a main report that calls popup report 1. Popup report 1 calls popup report2. This works, but when popup report 2 is selected, popup report 1 disappears. I was hoping that it would "layer" so that popup report 1 wouldn't close when popup report 2 is selected.

  2. myDBR Team, Key Master

    Popups on top of popups are supported.

    Make sure you are using different embedded elements for the different popups. Also, with 3.0 you can define the z-index for a popup.

    --
    myDBR Team

  3. -nth-, Member

    Would it be possible to get an example of how to use the z-index for popups?

  4. myDBR Team, Key Master

    Sure:

    CREATE PROCEDURE sp_DBR_popup()
    BEGIN select 'dbr.report', 'sp_DBR_popup_drill', 'first', 1; select 'Open a popup'; select 'dbr.embed_object','first', 'popup', 100;
    select 'dbr.embed_object','second', 'popup', 101; END CREATE PROCEDURE sp_DBR_popup_drill()
    BEGIN select 'dbr.report', 'sp_DBR_popup_drill2', 'second', 1; select 'This is the first popup'; end CREATE PROCEDURE sp_DBR_popup_drill2()
    BEGIN select 'This is the second popup'; end

    --
    myDBR Team

  5. -nth-, Member

    I got the above example to work, but when I apply it to my situation, I can't get it to run properly. So here's my code:

    Report 1:

    IF object_id('sp_DBR_Report1','P') IS NOT NULL
    DROP PROCEDURE [sp_DBR_Report1]
    GO
    CREATE PROCEDURE sp_DBR_Report1 @inLogin varchar(30)
    AS
    BEGIN
    DECLARE @Tstatus varchar(10);
    SET @TStatus = 'Unassigned';
    select 'dbr.tab', 'Unassigned';
    select 'dbr.tab', 'Assigned';
    select 'dbr.tab', 'Closed';
    select 'dbr.report', 'sp_DBR_Report2', 'Unassigned','CID=2', 'inLogin=3', 'Tstatus=4';
    select 'dbr.list', 'hlist';
    select 'dbr.hidecolumns',2;
    select c.CName as 'CName',
    c.CID as 'CID',
    @inLogin,
    @Tstatus
    from mydbr_Data..CInfo as c
    select 'dbr.embed_object', 'Unassigned';
    select 'dbr.embed_object','Report3', 'popup', 100;
    select 'dbr.embed_object','Report4', 'popup', 101;
    select 'dbr.tab.next';
    SET @Tstatus = 'Assigned';
    select 'dbr.report', 'sp_DBR_Report2', 'Assigned','CID=2', 'inLogin=3', 'Tstatus=4';
    select 'dbr.list', 'hlist';
    select 'dbr.hidecolumns',2;
    select c.CName as 'CName',
    c.CID as 'CID',
    @inLogin,
    @Tstatus
    from mydbr_Data..CInfo as c;
    select 'dbr.embed_object', 'Assigned';
    select 'dbr.tab.next';
    SET @Tstatus = 'Closed';
    select 'dbr.report', 'sp_DBR_Report2', 'Closed','CID=2', 'inLogin=3', 'Tstatus=4';
    select 'dbr.list', 'hlist';
    select 'dbr.hidecolumns',2;
    select c.CName as 'CName',
    c.CID as 'CID',
    @inLogin,
    @Tstatus
    from mydbr_Data..CInfo as c;
    select 'dbr.embed_object', 'Closed';
    END

    Report 2:


    IF object_id('sp_DBR_Report2','P') IS NOT NULL
    DROP PROCEDURE [sp_DBR_Report2]
    GO
    CREATE PROCEDURE sp_DBR_Report2 @CID varchar(25), @inLogin varchar(30), @Tstatus varchar(10)
    AS
    BEGIN
    select 'dbr.report', 'sp_DBR_Report3', 'Report3','popup','ControlNum=1';
    select 'dbr.report', 'sp_DBR_Report4', 'Report4','popup', 'ControlNum=1';
    select 'dbr.editable', 8, 'sp_DBR_Report5', 'ControlNum=1', 'inLogin=9','type=select', 'select=select ''Unassigned'' union select ''Assigned'' union select ''Closed''';
    select 'dbr.hidecolumns',1;
    select a.ControlNum as 'ControlNumber',
    a.CName as 'Customer Name',
    a.TotalCharge as 'Billed',
    a.Adress as 'Address',
    a.City as 'City',
    a.State as 'State',
    a.Comment as 'Comment',
    c.Tstatus as 'Status',
    @inLogin
    from mydbr_Data..TMaster as a
    JOIN mydbr_Data..CInfo as b on
    a.CID = b.CID
    JOIN mydbr_Data..TTracking as c on
    a.ControlNum = c.ControlNum
    where a.CID = @CID and c.Tstatus = @Tstatus;
    END
    GO

    Report 3:


    IF object_id('sp_DBR_Report3','P') IS NOT NULL
    DROP PROCEDURE [sp_DBR_Report3]
    GO
    CREATE PROCEDURE [dbo].[sp_DBR_Report3] @ControlNum varchar(25)
    AS
    BEGIN
    select 'dbr.sum', 4;
    select b.ItemName,
    b.ItemDescription,
    b.ItemDate,
    b.ItemAmt
    from mydbr_Data..CTranDetail as b
    where b.ControlNum = @ControlNum END
    GO

    Report 4 is similar to report 3. But they always close each other out. I've tried redesigning without tabs, but still end up in the same spot. I'm still missing something...

  6. -nth-, Member

    Think I figured it out myself... when using the embed object command, I need to take out the popup designation in the dbr.report line. It works now! Yay!

  7. myDBR Team, Key Master

    The 'popup' in dbr.report-command is just a predefined embed_object. In most cases one just uses one popup and having a predefined embed_object saves one a trouble of defining the embed_object.

    --
    myDBR Team

  8. -nth-, Member

    I'm trying to figure out a consistent method to how the popups overlay one another. I figured that each new popup would be a layer on top of the previous one, but that isn't always the case, some end up as "pop unders". The zindex doesn't appear to change that either. Is there a way to control how they are layered? For my purposes I was trying to get any new popup to be layered on top of the previous one.

    Thanks!

  9. myDBR Team, Key Master

    Do you have an example where the z-index does not work as expected?

    --
    myDBR Team

  10. -nth-, Member

    Maybe I'm all confused about what the zindex does... so let's start there... :)

    I was thinking the Zindex helps define the "layer" order of popups. The higher the zindex, the closer the "layer" is to the top. So a popup report with an index of 101 should overlay on top of a popup report of index 100, but underlay a popup with and index of 103. Is this correct?

  11. myDBR Team, Key Master

    Yes, this is correct. The higher the z-index is, more closer to top the popup is.

    However, please take into account that having multiple levels of popups appearing for the user might not be the easiest way for user to navigate. If your reports show multiple popup levels, you might want to consider if there is a better way of presenting the data.

    --
    myDBR Team


Reply

You must log in to post.