Multiple levels of editable reports?

(5 posts) (2 voices)

Tags:

No tags yet.

  1. -nth-, Member

    I've got a main report (report1) using dbr.tab to call a linked report (report2). Report2 , in turn, calls a dbr.editable report3... except that Report3 isn't editable. If I start at Report2 then link to Report3, it's editable, but if I start at Report1 and link down to Report3 it's no longer editable. Is there a way to accomplish this or can editable reports only work for one level of linking?

    Thanks,
    -nth-

  2. myDBR Team, Key Master

    Hi,
    The editing should work, but could you show how the tabs are created?

    --
    myDBR Team

  3. -nth-, Member

    Sure.

    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.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.pager', 50;
    select 'dbr.editable', 8, 'sp_DBR_Report3', '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 sp_DBR_Report3 @ControlNum varchar(50), @inLogin varchar(30), @inValue varchar(10)
    AS
    BEGIN
    update mydbr_Data..TTracking
    set Tstatus = @inValue
    where ControlNum = @ControlNum;
    INSERT INTO mydbr_Data..TTrackingComments (UserID, CommentDate, Comment, ControlNum)
    VALUES (@inLogin,CURRENT_TIMESTAMP,'Status changed to ' + @inValue,@ControlNum);
    END
    GO

  4. myDBR Team, Key Master

    Hi,
    most likely it's the pager that not working correctly in that use case. You can try it without the pager. We'll take a look at it.

    Nice work making use of quite many features in single report ;)

    P.S. The "select 'dbr.hidecolumns',2;" is not needed when using dbr.list.

    --
    myDBR Team

  5. myDBR Team, Key Master

    A fix for this has been included in the 3.0 release.

    --
    myDBR Team


Reply

You must log in to post.