Parameter to Parameter

  • Hi! I'm back

    How do I pass the value of a parameter to another parameter.

  • Ok. got that sorted by choosing non-queried for available values and setting the value to '=Parameters!EndPeriod.Value. However that makes my query extremly slow

    Please help

  • in your datasets say for eg

    select * from this where this is in (@parametername)

    if you want more help, i think you need to give more details.

  • thatok (7/22/2008)


    Ok. got that sorted by choosing non-queried for available values and setting the value to '=Parameters!EndPeriod.Value. However that makes my query extremly slow

    Please help

    thatok,

    Its not clear about your source Table size.

    It may be the reason that your filter condition is taking too much time.

    If this is the case, you need to optimize your query by proper indexing.

  • Here's the scenario:

    Dataset1:

    Select *

    from MyTable

    Where Period Between @StartPeriod AND @EndPeriod; --- Works like a charm

    Dataset2:

    Select *

    from MyTable

    Where Period = @Period;

    @Period should get its values from @EndPeriod.

    The idea is: Headcount report showing monthly staff headcount in a table and Year to Date growth in a graph. Dataset1 would populate the graph while dataset2 populates the table

  • why can't you just put

    Dataset2:

    Select *

    from MyTable

    Where Period = @EndPeriod;

    ?

  • Thank you very much. It works. And it's fast again

  • good to hear!

Viewing 8 posts - 1 through 7 (of 7 total)

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