Using inLogin in a Popup / Select List

(2 posts) (1 voice)
  1. KymWade, Member

    I need to create a select list or popup parameter that is filtered based on the inLogin automatic variable.

    I created the following stored procedure as the records source for the Select List in MS SQL

    CREATE PROCEDURE sp_dbr_popup_projects @inLogin varchar(30)
    AS
    BEGIN

    SELECT iResourceID, Resource FROM f_lst000001Project(@inLogin)

    END

    I then have the following report stored procedure

    CREATE PROCEDURE [dbo].[sp_dbr_ProjectTasks_select](
    @inLogin varchar(30), @inParentID nvarchar(255))
    AS
    BEGIN
    SELECT 'dbr.title', 'Project Tasks';

    SELECT * FROM [f_rrt000001ProjectTasks](@inLogin)
    WHERE iParentResource_iRID = @inParentID;

    END

    I then created a query parameter as follows
    Parameter Input Type Query
    List Projects Select list sp_dbr_popup_projects

    I need to be able to get the iResourceID from the Select List and pass it to the report Stored Proc as @inParentID.

    This gives me an error when trying to run the report.

    Is there a way of getting a popup list to be filtered by the inLogin variable?

    Thanks
    Kym

  2. KymWade, Member

    I have solved my problem. I simply needed to create a select statement Parameter Query and use the reserved word inLogin where I wanted to pass the user login to me table function in the MS SQL back end.

    ie.
    SELECT iResourceID, Resource FROM f_lst000001Project(inLogin)

    I then used this as the user input parameter for the inParentID parameter in the report stored procedure.

    Regards
    Kym


Reply

You must log in to post.