Cannot get client parameter to work correctly

  • HI All

    I am building a report that has 3 parameters.

    @StartDate

    @EndDate

    @client

    Basically, the objective here is to select to and from date and client from the list and only pull that clients information.

    My first dataset query is this:

    select

    a.USER_CASE_ID as CaseNo,

    CONVERT(VARCHAR(24),a.create_date,103) as Date_Case_Logged,

    CONVERT(VARCHAR(24),a.case_resolved_date,103) as Date_Case_Resolved,

    cast(a.Case_Resolved_Date - a.create_date as int) as Days_Case_Took_to_Resolve,

    a.subject as Case_Subject,

    a.description as Case_Description,

    B.First_Name + ' ' + B.Name as Contact

    from CScASES_VIEW A

    inner join AMGR_Client B on a.client_id = b.client_id and a.contact_number = b.contact_number

    WHERE A.CREATE_DATE between @StartDate and @EndDate

    --and b.name_type = 'I'

    and a.contact_number = '0'

    and a.record_type = '0'

    AND A.CLIENT_NAME = B.NAME

    group by a.case_number, a.create_date, a.case_resolved_date, a.subject, a.Description, a.USER_CASE_ID, b.first_name, b.name

    second dataset (Client parameter)

    select a.First_Name + ' ' + a.Name as Client,

    b.create_date,

    b.description,

    b.USER_CASE_ID,

    a.name_type

    from AMGR_Client A

    inner join CSCases_View B on a.Client_Id = b.client_id and a.contact_number = b.client_number

    where a.client_id = b.client_id

    and b.client_name = @Client

    group by a.First_Name, a.name, b.create_date, b.description, b.USER_CASE_ID, a.name_type

    when i run the report - i get this error:

    The report parameter ‘Client’ has a DefaultValue or a ValidValue that depends on the report parameter “Client”. Forward dependencies are not valid.

    if i take out the b.client_name = @Client... all the information is returned for all clients. I only want to select a client and a date range then display that information..

    any help will be greatly appreciated...

  • You're attempting to get a list of valid clients from your dataset that requires the parameter Client, which is impossible to run. SSRS needs a value for @Client to run the query, however, your using that same dataset to give the default, or available values, so it doesn't work (it's basically like a self referencing cell in Excel).

    You'll need to use a different dataset to provide your Client, that does not require the Client parameter, to let SSRS know the available/default values.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • i figured it out.. sorted the issue.. Thanks though

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply