SSRS 2008 optional parameter ? Value still required if I check allow null

I know there are other posts about this and Ive read them, but I still dont see how to allow the user to skip making a selection for that particular parameter.  I have two parameters on a report.  One of them Id like the user to be able to simply
not choose anything if they want to, and have that default to NULL.  Im handling that in the query for the dataset.
Ive seen the suggestions to include some "ALL" selection in the list by way of a union
Does a user HAVE to make a selection of a dropdown list?

If you have specified a Default Value for parameter then user need not select any value. User can directly click on View Report.
- Vishal
SqlAndMe.com

Similar Messages

  • Ssrs 2008 r2 parameter values

    In a new ssrs 2008 r2 report, I need to display 2 of the parameter values in the heading of the report. One of the parameter values in the name and customer number. The second heading value is the city and state where the particular customer is located at.
    The customer table has the following values:
    a. cust_id int primary-id,
    b. customer_name varchar(50),
    c. cust_address1 varchar (50),
    d. cust_address2 varchar (50),
    e. cust_city_state varchar(40),
    f. cust_zip_providence varchar(30),
    g. cust_country varchar(30).
    Thus I need to place the  paramter values of customer_name and cust_city_state that are obtained from a dropdown list in the heading.
    when I try =first(customer_name) in the heading, the value is only good for the first customer name. After that, the wrong parameter value is displayed.
    Thus can you tell me and/or show me code of what I can do to place the parameter values
    of customer_name and cust_city_state in the heading of the report?

    Follow below steps,
    1. Create 3 Data set.
     DS1 = select * from customertable
     DS2 = select distinct customer_name from customertable
     DS3 = select distinct cust_id from customertable
    2. Add two parameter, customer name and customer number
     --------parameter 1
     - supply Name property for 1st parameter
     - datatype for the parameter is string
     - Available value property, Select dataset DS2, Select Field Value as "Customer_Name"
     --------parameter 2
     - supply Name property for 2st parameter
     - datatype for the parameter is string
     - Available value property, Select dataset DS3, Select Field Value as "Cust_id"
    3. Add a blank tablix/table.
     -- Select TableRow2 and right click to add new group i.e insert group.
     -- Group properties window will be openned,
     -- Select Group On Expression 1st.
     -- Select the parameter(Parameter1/customer name) by double clicking in the expression window
     -- Select Group On another Expression 2nd.
     -- Select the parameter(Parameter2/Cust Id) by double clicking in the expression window
     -- Now in the general tab you need to checked "Repeat Group Header"
     -- press ok to close the group properties window.
    4. Now from DS1 drag the field City and State in TableRow3 columns.
    5. Drag the Customer Name and Customer Id/Number in TableRow1.
    6. In case if First(Fields!CustomerName) appears then remove First function as simply "Fields!CustomerName". Similarly for Customer Number.
    7. Finally we need to set the filter condition of the table property. Open the table property by right clicking. On the "Filter" tab choose the expression as "Fields" items and double click "CustomerName" to add in the expression. Similarly add second
    field "CustomerNumber" in the expression. Check the operator "=" and choose the value as "Parameter" items respectively.
    Regards, RSingh

  • Crystal reports 2008 Set optional parameter value

    Hi,
    I'm working with .net Visual Studio 2008 C# and Crystal reports 2008 (Crystal.Decisions) and when I try to set a parameter to optional and set its value to no value, it returns the error: "Invalid parameter name", here is my code:
    foreach (CrystalDecisions.Shared.ParameterField param in Report.ParameterFields)
                            if (!param.HasCurrentValue &&
                                !Report.DataDefinition.ParameterFields[param.Name].IsLinked())
                                switch (param.ParameterValueType)
                                    case ParameterValueKind.NumberParameter:                                  
                                        param.IsOptionalPrompt = true;
                                        param.CurrentValues.IsNoValue = true;                                  
                                        break;
    I'm doing this because some of the parameters can be left null, and in this case I don't want to show the parameter prompt.
    In past versions of Crystal (such as Crystal Reports 11.5) we had the chance to left the parameter value null and did not showed the parameter prompt dialog, and this behavior repeats in a lot of reports.
    thanks in advanced

    Please don't post the same question more than once. This is a public forum so be patient.
    Install SP4 and test again.
    Try these samples:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications
    Don

  • Ssrs 2008 want parameter default values to display

    In an ssrs 2008 report, I want to add a parameter called Processed and have default values set so the
    user does not have to select the parameters. The problem is the default parameters are not preselected
    when the report is executed.
    The following is the query for the dataset that is used for the parameter called Processed. This
    is used under available values.
    select DISTINCT IsNull(Processed,'') as Processed,
    CASE IsNull(Processed,'')
      WHEN 0 then 'Non Processed'
      WHEN 1 then 'Processed'
      END AS label
    FROM [Items]
    where Processed in (0,1)
    order by label
    The default values are set to 0 and 1.
    The column called Processed as defined as 'bit'.
    Thus can you tell me what you think could be wrong? Do I need to specify the bit values as
    something else? If so, how should I refer to the values for bit?

    Hi wendy,
    According to your description, this issue can be caused by the values returned by the query. We can try to execute the query in Query Designer to check which values will be returned. Maybe it only returns one value (0 or 1). Then the available values for
    the Processed parameter have only one value. So the default values will not be preselected when the report is initially run.
    Besides, we can also try to use the same query as the default values for the parameter to check the issue again.
    Hope this helps.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Ssrs 2012 change parameter values

    In an existing SSRS 2012 report, I have a requirement for a user to be able to select by multiple school(s) and/or multiple grade(s). This is fine except certain schools like elementary have grade levels of KG to 06, Middle school has grades of 06 to 09
    and high school has grades of 10 to 12. Thus for example, if a user has initially selected grades 11 and 12 and then they select an elementary school that has grades KG through 06, the 'grade level' selection would need to change.
    In other words,  I am thinking of initially having the available and default values for the parameter called 'Grade' set to KG through 12. However if a school is selected that only has specific grade levels like elementary school, how can I override
    the original grade level and only allow the user to select grades that the particular school contains?

    Hi Wendy,
    Per my understanding that you have two multiple value parameters "School" and "Grade", you have specify the available values and default values for these two parameters, now you want to value which displayed in the
    dropdown list of Grade depende on the selection in the School parameter, right?
    I have tested on my local environment and you can create cascading parameter for Grade, for example, when you select "Elementary" in the School the grade dropdown list will display "1,2,3,4,5", when you select the "Middle",
    the grade will display "6,7,8,9", when you select the "High", the grade will display "10,11,12".
    If this is case, please reference to the details information below to achieve this:
    1. Create an new dataset2 and use the query below to get the values from this query for the parameter School:
    select distinct a.School from
    (SELECT 'Elementary' AS School, 1 AS grade
    UNION
    SELECT 'Elementary' AS School, 2 AS grade
    UNION
    SELECT 'Elementary' AS School, 3 AS grade
    UNION
    SELECT 'Elementary' AS School, 4 AS grade
    UNION
    SELECT 'Elementary' AS School, 5 AS grade
    UNION
    SELECT 'Middle' AS School, 6 AS grade
    UNION
    SELECT 'Middle' AS School, 7 AS grade
    UNION
    SELECT 'Middle' AS School, 8 AS grade
    UNION
    SELECT 'Middle' AS School, 9 AS grade
    UNION
    SELECT 'High' AS School, 10 AS grade
    UNION
    SELECT 'High' AS School, 11 AS grade
    UNION
    SELECT 'High' AS School, 12 AS grade)a
    2. Create the dataset3 and use below query to get the values from this query for the parameter grade:
    SELECT a.grade
    FROM (
    SELECT 'Elementary' AS school, 1 AS grade
    UNION
    SELECT 'Elementary' AS school, 2 AS grade
    UNION
    SELECT 'Elementary' AS school, 3 AS grade
    UNION
    SELECT 'Elementary' AS school, 4 AS grade
    UNION
    SELECT 'Elementary' AS school, 5 AS grade
    UNION
    SELECT 'Middle' AS school, 6 AS grade
    UNION
    SELECT 'Middle' AS school, 7 AS grade
    UNION
    SELECT 'Middle' AS school, 8 AS grade
    UNION
    SELECT 'Middle' AS school, 9 AS grade
    UNION
    SELECT 'High' AS school, 10 AS grade
    UNION
    SELECT 'High' AS school, 11 AS grade
    UNION
    SELECT 'High' AS school, 12 AS grade) AS a
    where a.school in (@School)
    3. Create two parameters "School" and "Grade" check the "Allow Multiple Values" and also set the "Availble values" and "Default values" by select the "Get values from a query" as below:
    4. Preview as below:
    More details information about add Cascading Parameters to a Report:
    Add Cascading Parameters to a Report (Report Builder and SSRS)
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • CR 2008 - Optional parameter prompts

    Hi!
    I sometimes use Optional parameter prompts in Crystal Reports 2008.
    The main reason is to minimise user input in Selection Criteria Screen.
    I have many subreports, and not all prompts are needed for all subreports.
    If the user leaves the prompt blank, then a formula will set a default value for the user.
    I usually put the optional prompt at the top, so that user needs only fill prompts at the bottom.
    Here is an example:
    I have a parameter field called "PreferredSortOrder"
    The Edit screen reads as follows:
    Type: String
    List of Values: Static
    Value:
        Original Order
        Description
    Value Options:
    Show on (Viewer) Panel           : Read Only
    Prompt Text                              : Preferred Sort Order [Optional]
    Prompt With Description Only  : True
    Optional Prompt                        : True
    Default Value                             :
    Allow custom values                 : False
    Allow multiple values                 : False
    Allow discrete values                 : True
    Allow range values                     : False
    Min Length                                  :
    Max Length                                  :
    Edit Mask                                   :
    Show value or Description        : Show Value
    My report works perfectly, even if I leave the parameter field blank
    I now add another parameter field called "WhichWarehouse"
    with exactly the same values as above.
    When I run the Crystal Report, I get this message;
    Error running Crystal Reports
    The report runs only if I type a value in the "WhichWarehouse" prompt
    (The "PreferredSortOrder" prompt remains blank)
    I did exactly the same as before. Why does the 2nd optional parameter not work like the first?
    What has gone wrong?
    Thank you
    Leon Lai
    JUST ADDED
    I just noticed that in the Field Explorer,
    (a) There is a green TICK near the parameter PreferredSortOrder
    (b) But no green Tick neat the parameter "WhichWarehouse"
    What does the green tick mean?
    Could this be the key to the mystery?

    Hi Leon,
    No green tick means that the prompt has Not been used in the report.
    If the report has Subreports, and if the subreport also has a 'warehouse' prompt then it could be this prompt that is causing the issue. You should link both the warehouse prompts to make sure you're only prompted once.
    -Abhilash

  • SSRS Report date parameter values using SSAS Cube as datasource

    Hey Guys, 
    i m building an SSRS report using SSAS cube as the data source. The report contains shared data-sets which provide the required data. below is the set up.
    Sql server version : Sql server 2008R2
    Report builder 3.0 
    I have, Report A, powered by Dataset D, running on Cube C. The dataset has 3 parameters out of which one of them is a date parameter- P1. I have it set up such that on the report there is  another parameter - P2 which contains the type as Date ( to
    ensure the user is exposed to a date picker), the input from this, P2 is then manipulated to required format before fed into the dataset parameter P1 (hidden). I have two questions regarding this parameter.
    Currently, when the user pick's a date (P2) which has no values, the report errors out as it doesn't find that corresponding member on the cube. Can it be made such that if the member doesn't exists, a simple error message like "date not found"
    pops up as opposed to report failing?
    Secondly, can i manipulate the date picker (P2) exposed to the user such that the unavailable dates are grey'ed out on the date parameter (P2)? 
    Please let me know if there is any more info required on each of the questions.
    Thanks
    Srikanth

    Hello Katherine,
    below are the errors which pop up with the 'Constrained' function in place and without. The MDX query is what follows.
    Without: 
    An Error has occurred during report processing. (rsProcessingAborted). The Execution Failed for the shared data set “Dataset1”.(rsDataSetExecutionError). Query Execution failed for dataset ‘DataSet1’. (rsErrorExecutingCommand). The dimension ‘[10 Sep 2014]’
    was not found in the cube when the string, [10 Sep 2014], was parsed.
    With Constrained flag:
    An Error has occurred during report processing. (rsProcessingAborted). The Execution Failed for the shared data set “Dataset1”.(rsDataSetExecutionError). Query Execution failed for dataset ‘DataSet1’. (rsErrorExecutingCommand). Query(1,1476) The restrictions
    imposed by the CONSTRAINED flag in the STRTOSET function were violated.
    SELECT
    NON EMPTY
    [Measures].[A]
    ,[Measures].[B]
    ,[Measures].[C]
    ,[Measures].[D]
    ,[Measures].[E]
    } ON COLUMNS
    ,NON EMPTY
    [DimA].[LevelA].[LevelA].ALLMEMBERS*
    [DimB].[LevelB].[LevelB].ALLMEMBERS*
    [Date].[Date].[Date].ALLMEMBERS
    DIMENSION PROPERTIES
    MEMBER_CAPTION
    ,MEMBER_UNIQUE_NAME
    ON ROWS
    FROM
    SELECT
    StrToSet (@FilterA ,CONSTRAINED) ON COLUMNS
    FROM
    SELECT
    StrToSet(@Date, CONSTRAINED) ON COLUMNS
    FROM [Cube1]
    WHERE
    [DimC].[Level1].&[Member1]
    ,[DimC].[Level2].&[Member1]
    ,[DimC].[Level3].&[Member1]
    ,[DimC].[Level4].&[Member1]
    Thanks
    Srikanth

  • CR 2008, missing parameter values in parameter list

    somehow this thread got posted in the  .NET SDK section, so re-posting here...
    When my users run the report, the list of values in the paramter list does not include all the possible values that exist in the view on SQL server.
    How can I get ALL the values of the field in the view to show up in parameter list?  What is controlling how many/few values show up?  I have not limited in any way what should be returned from the view (not a cascading set of parameters), and the view is not set up to limit what values are available either.
    Thanks for any pointers.
    Robert

    From a mis-post on the .NET forum, a solution was suggested that works....
    Re: CR 2008, all values in parameter list not showing up

  • SSRS 2008 R2 Report parameters have default values and report not to auto run

    Hi, I am using SSRS 2008 R2 one of my requirements for a Report is all the parameters have default value and I do not want this report to auto run when users open this report. I can create a dummy hidden parameter to break the auto run for this
    report. But I am looking for solutions other than that.
    Thanks in advance..........
    Ione

    Hi lone,
    According to your description, you have a report with parameters. Now you want you report not to run automatically with your parameters default values. Right?
    In Reporting Service, if you have parameters with default values in your report, your report will always auto run with these default values. We can say these default values are used for report running initially. So for your requirement, if you really need
    to see your default value before the report running, the best workaround is set one more parameter to break the auto run like you have done. If you just want your report not to auto run, your can achieve it by removing those default values.
    Reference:
    Report Parameters (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou (Pactera)

  • Ssrs 2008 r2 date parameter not working all the time

    In an SSRS 2008 r2 report, I am not getting some records selected when I run the report in the ssrs 2008 r2 report.
    However when I run the sql in ssis manager, the records are selected. Thus I am trying to determine why some of the records are not selected whe running the ssrs report.
    In the table called 'transactionfile', the fields that I am trying to determine where there is a problem is the following:
    SchoolNumber (varchar(50),null), and
    TransactionPaymentDate (varchar(50),null).
    Examples of data are SchoolNumber = '121' and TransactionPaymentDate = '04162014'
    In the SSRS report, the parameter value for @SchoolNumber is text and the parameter value for @EndDate and @StartDate is date/time.
    The following is the query I am having a problem with:
    SELECT  s.SchoolNumber,      
          CONVERT(smalldatetime,substring(TransactionPaymentDate,5,4) + '-' + substring      (TransactionPaymentDate,1,2)+ '-' +
    substring(TransactionPaymentDate,3,2)) as        TransactionPaymentDate
     from [eF].[dbo].[transactionfile] f
           INNER JOIN
        [eF].[dbo].schools] s      
        on rtrim(ltrim(s.SchoolNumber)) =rtrim(ltrim(f.SchoolNumber))
     where  rtrim(ltrim(s.SchoolNumber)) = rtrim(ltrim(@SchoolNumber))
          AND
          Cast(Right(TransactionPaymentDate,4)+Left(TransactionPaymentDate,4)  as Date)
            >= @StartDate
         AND
       Cast(Right(TransactionPaymentDate,4)+Left(TransactionPaymentDate,4)  as Date) <= @EndDate
    Thus could you suggerst what could be wrong when selecting some records by date?

    First check whether transaction payment date has 8 digit or not. In yes then try the below query,
    SELECT s.SchoolNumber,
    CONVERT(smalldatetime,substring(TransactionPaymentDate,5,4) + '-' + substring(TransactionPaymentDate,1,2)+ '-' +
    substring(TransactionPaymentDate,3,2)) as TransactionPaymentDate
    from [eF].[dbo].[transactionfile] f
    INNER JOIN [eF].[dbo].schools] s
    on rtrim(ltrim(s.SchoolNumber)) =rtrim(ltrim(f.SchoolNumber))
    where rtrim(ltrim(s.SchoolNumber)) = rtrim(ltrim(@SchoolNumber))
    AND
    cast(substring(TransactionPaymentDate,5,4) + '/' +
    substring(TransactionPaymentDate,1,2)+ '/' +
    substring(TransactionPaymentDate,3,2) as date) between @StartDate AND @EndDate
    Regards, RSingh

  • "Option's value is unacceptab​le" while configurin​g the sync settings for Outlook

    Hello
    I was wondering if someone could please help me with this error message:
    "Option's value is unacceptable. Please check option properties"
    I receive this message when trying to configure synchronization settings for Microsoft Outlook 2007 in Desktop Manager 5.0.1.
    It does not matter whether I select Calendar, MemoPad, Address book or Tasks I get this error message.
    I am aware that there is a BTSC article on this problem which simply states the IMAP Profile is corrupt. I have only had this problem since moving to Windows 7 from Vista. When moving to 7 I copied across my PST files. Outlook reads them fine but DM is throwing a hissy fit. I used the Microsoft Outlook PST repair tool and that fixed some errors in the file but DM still wouldn’t read it. I have also imported the PST file again into Outlook but no joy there.
    Interestingly I have also created a brand new PST file in outlook and DM still gave me the error message. I don’t see how a brand spanking new PST can be corrupt. This leads me to believe my current PSTs are OK and DM is the problem.
    I have tried uninstalling, restarting, and reinstalling DM and have also tried deleting the RIM folder in the roaming folder in AppData to no avail.
    I have Googled this issue and came across a few posts in this forum but couldn’t find anything that helped.
    If anyone has ANY suggestions that would be great. My calendars work fine on my computer through Outlook, the problem is without being able to sync them they are slowly getting more and more different!
    Thanks
    Cameron
    Solved!
    Go to Solution.

    What saddens me is that this problem still exists after 3-5 years of this problem first being introduced.  I have tried the above and several other options posted on BB Forum, all to no avail.  I have being enduring the inability to sync my BB and life together for nearly a year now.  Talk about frustration and aggravation in tryng to sync my Outlook and BB calendars manually.  I even went and upgraded my BB Curve 8330 to a BB Curve 9330, only to have the same problems when syncing.   
    But today I googled the internet once again to finally find the post that had the answers and resolved my issues! A TREMENDOUS THANK YOU to Matt Seitz and his live journal entry at http://seitz.livejournal.com/3593.html. 
    The following is from his post:
    Blackberry sync with Outlook fails if no mail account is configured
    It surprises me how software that is published by and widely used by major corporations can be so badly written.
    I recently tried installing Microsoft Outlook and RIM Blackberry Desktop Manager so that I could sync my Blackberry with my PC.  When I tried to configure the Blackberry Desktop Manager to sync with Outlook, I received a cryptic "Option's value is unacceptable" error message.  It would have been nice if the software told me which option, what the value was, and why that value was unacceptable. 
    After much searching, I finally came across an article from RIM that explained this was because my Outlook e'mail (MAPI) profile was invalid.  That was probably because I hadn't configured Outlook to access e'mail.  I use Yahoo! Mail's web (HTTP) interface and didn't want to use Outlook (or any other POP client) to access my mail.
    But apparently Desktop Manager requires that Outlook be configured with an email account, even if I don't plan to access email via Outlook.  So, I dutifully added my Yahoo Mail account to Outlook, and simply told Outlook to never access it.
    But that wasn't good enough.  I then received an error from Outlook:  "The operation failed. An object could not be found."  Once again, the error is cryptic.  What operation failed?  Which object was not found?
    A Microsoft article explained that the only cure for this error was to configure a whole new user profile in Outlook.  I did that, and finally my Blackberry would sync with Outlook.
    After creating a new user and linking it to an email, I too was able to finally sync my BB 8330 and my BB 9330 with Outlook.  Hallelujuh!!!

  • Check select-options parametr value

    hi,
    i want to check if select-option parameter value is '002' then execute some code, how can i do that .
    thanks in advance,
    ramakrishna buddala.
    Moderator Message: Not enough search done. Thread locked.
    Edited by: Suhas Saha on Oct 20, 2011 3:15 PM

    Hi
    Perform the validation in AT Selection-screen on field event.If validation is not succes then give error message.
    AT selection-screen on <Fieldname>.
    if fieldname-low <> '002'.
       message '<Message Text>' type 'E'.
    endif.
    Regards.
    Raghu.

  • Any way to find parameter value for a report?

    CS2008 SP3 - version 12.3.0.601
    Is there any way parameter value of a report can be found? The following code doesn't return parameter value but returns name.
    Fields existingReportParameters = null;
                            IDataDefinition dataDefinition = reportDocument.getDataDefinition();
                            existingReportParameters = dataDefinition.getParameterFields();
                            if (existingReportParameters != null) {
                                  for (int i = 0; i < existingReportParameters.size(); i++) {
                                        IField field = existingReportParameters.getField(i);
                                        if (field instanceof ParameterField) {
                                              ParameterField pa = (ParameterField)field;
                                              String paramName = pa.getName();
                                              //Values values = pa.getValues();
                                              //Object value = values.get(0);
                                              //System.out.println("*** repName Parameter - " + paramName + ":" + values);
                                              System.out.println("*** repName Parameter - " + paramName);
    Need to find a solution soon. Thanks in advance.

    Hello,
    Try searching, I have post code snippets on how to get values. I don't know for sure though if that code will work in CR 2008.
    Don

  • Error in InfoView "The Parameter Value is not Valid"

    Hello,
    I have developed a Crystal Report in CR2008 and uploaded in the InfoView. Now when i run the report via scheduling or load the report with the data and try to change the parameter (editable set in CR) from the drop down list and hit apply i get an error dialogue box "The parameter value is not valid" and message says "null".
    Also another issue is that i cannot execute the report directly in InfoVIew, i have to schedule it to run the report. Report is connected to the SAP InfoSet.
    Any input would be much appreciated.
    Thanks.

    We have rebuild new servers for InfoVIew and it just works fine. Both the problem solved.

  • Ssrs 2008 r2 using parameter values

    In an existing ssrs 2008 r2 report, I have a requirement from a user where they want to add 2 more parameters to the report. Right now there is an option where the user can choice to generate report1, report2, report3, report4, report5, report6, report7,
    report8, and/or any combination of the reports I just listed.
    This is setup by using an expression in the visibility property for each of the 8 tablixes.
    For your information, the following is an example of how to display one of the reports or not:
    =iif(InStr(join(Parameters!report.Value,","),6)>0,false,true)
    Now the user wants to be able to add the parameters of customer and inventory_item based upon if report7 and/or or report8 is selected.
    Now can you tell me the following:
    1. Would you show me the code I can use in the dataset to select report7 and/or report8?   
     2. If the above is not possible to select specific reports, then would the dataset query need to look something like: where @report is null or where @report is not null? What would you suggest?

    Hi midnight_car,
    According to your description, you have specified visibility for each tablix in a report with IIF() function. When you select 7 or 8, you want to add an additional parameter to filter displayed tablixes, right?
    In Reporting Services, since we can’t specify the visibility of a parameter as an expression, we could add a cascading parameter. When the first value is 7 or 8, then selected values from the cascading parameter can filter the displayed tablixes. Please
    refer to steps below:
    1. Sample data.
    2. Create a new dataset with the query below:
    select distinct SalesTerritoryRegion as region from dbo.DimSalesTerritory
    where SalesTerritoryRegion=
    case when 3 in (@report)or 4 in (@report)
    then SalesTerritoryRegion
    else 'NA' end
    3. Specify the parameter @region using the new dataset.
    4. Query in main dataset like below:
    select SalesTerritoryRegion as region,SalesTerritoryCountry as country,SalesTerritoryGroup as [group] from dbo.DimSalesTerritory
    where SalesTerritoryRegion= case when 3 in (@report) or 4 in (@report)
    then @region
    else
    SalesTerritoryRegion end
    4. Preview the report.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

Maybe you are looking for