SSRS Report prompt before parameters

  • HI

    I have created a report with 2 paramters, partno and lotno.

    It is now needed that the user gets prompt before entering the paramtner which one he/she would like to choose partno or lotno.

    Is there a way for the report to prompt the user to say " select from Partno or lotno" then if the user select partno, they will then get prompt with the partno parameter to enter.

    Thanks

    R

  • Yes, you would have 2 parameters

    First would be the search selector (Partno or Lotno)

    Second would be the parameter for either the Part of lot.

    The second would have to depend on the value given in the first. Your second parameter would have to be based on a query that would yield results only after a first parameter selection was made.

    In a situation like this the order of parameters is important. The first parameter must be in your parameter list and the second must be second. If the second parameter (the one dependant on the value of the first parameter selected) the query will try and run, but will fail because it is missing an input value.

  • Thank you for your reply.

    so I need to help with this then if you could guide me. first of im not sure how to do a search selector??

    Thanks

    R

  • Add a parameter called Search or something like that. Make its available values based on a dataset:

    SELECT 'PartNo' AS Search

    UNION

    SELECT 'LotNo' AS Search

    Then make the query for your report dataset dynamic based on the value selected.

  • thank you. Getting there.

    So I have added the parameter for search.

    How to do assigned this in the query

  • Right click on the parameter and go to Parameter Properties.

    There is an Available Values tab in the dialog box, fill in your query info there.

  • Thanks, I already got that bit.

    I mean the bit where you said "Then make the query for your report dataset dynamic based on the value selected"

    I didnt understand what you meant.

  • Use the value returned from your PartNo / LotNo selection to alter the output of the dataset for your report appropriately

    If @Param = 'PartNo'

    Begin

    Query to return Part data here

    End

    Else

    Begin

    Query to return Lot data here.

    End

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

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