Filtering SSRS dataset on parameter INT

Hi.
I have a simple report which has a Week parameter.
Week is a multi select parameter populated from a dataset (values 1-52).
I have now added a filter to the main dataset:
Expression: [Week]
Operator: In
Value: Split(Fields!Week.Value, ",")
I get an error as soon as I try running the report with this filter:
An error has occurred during report processing. (rsProcessingAborted)
The processing of FilterExpression for the dataset ‘ProjectTimesheetDataSet’ cannot be performed. Cannot compare data of types System.Int32 and System.String. Please check the data type returned by the FilterExpression. (rsComparisonTypeError)
I have tried wrapping the the expression and Value with Cint, no joy.
If I write out the value of Week to the page using the Join funtoin I get resutls i.e. 48,49,50
Where am I going wrong??

Hi CDG100,
Based on my research, I think this issue is caused by the data type mismatch between Week field and parameter WeekNumber. If I understand correctly, the Week field is Integer data type in your dataset, while the parameter WeekNumber is Text (String) data
type. In your scenario, even we change the field to Integer (from Text), it will also turn back to Text. Because the filter always change the data type of Expression to match the Value data type. That’s the reason why the error message that “Cannot compare
data of types System.Int32 and System.String” appears.
So in order to fix the issue, please try to use an Integer data type field as the parameter values by using Get values from a query. Then the Week field and parameter WeekNumber can be compared.
If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • SSRS filter a dataset if parameter is "Yes"

    hello i have a report  as below
    with date Parameters this all works fine! 
    date from                date too 
    01/01/2011   21/02/2013 
    name        amount      date 
    test1 100
              01/01/2012
    test2        200             01/02/2013 
    but what i want is to have another parameter which says something like yes or no and a filter on the data set which responds to the parameter
    so that if the parameter = "yes" then filter the data set so as "not" too include test1 as a company but if "NO" then include all records! 
    Steve mason

    Add new parameter in SSRS report and pass it down to query .
    In the query add a filter like below
    WHERE....
    AND (name <> 'test1' OR @NewParameter = 'No')
    or if you want to do this in SSRS dataset do like below
    =IIF(Parameters!NewParameter.Value="Yes",Fields!Name.Value,0) for Expression
    <> for operator
    and
    =IIF(Parameters!NewParameter.Value="Yes","test1",1) for Value
    in dataset filter tab as per below
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Parameter driven query and SSRS Dataset fields

    I have a Parameter in my SSRS Report, @PatientSelection. I use this Parameter within my SQL Stored Procedure to execute one version of the report and get specific columns, or another version of the report with different columns.
    -- @PatientSelection is set to 1 if the Business Report Requestor chooses "New Patients"
    IF @PatientSelection = 1...
    -- @PatientSelection is set to 2 if the Business Report Requestor chooses "Established Patients"
    IF @PatientSelection = 2
    When I do this, none of my fields are showing up within my SSRS Dataset.
    Am I fundamentally doing this the wrong way concerning SSRS and Report Creation???
    Any feedback is greatly appreciated. Thanks for your review and am hopeful for a response.
    PSULionRP

    You can add manually  the missing fields, drag and drop all needed fields to the tablix and see how was it  going. Doo you use one or two tables(based on the parameters) to display the report?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • SSRS dataset filter expression using OR

    I have a dataset that I need to set a filter for. What I need the filter to do is check 3 different fields to see if either one of them are in a parameter. The parameter is multi-value. So, I have a parameter set to 1, 2, 3. I need the dataset to return
    records where either Field A, B, or C are IN 1, 2, 3.
    Anyone know how to do this? I tried to have the filter expression = Fields!A.Value or Fields!B.Value or Fields!C.Value then the dataset filter operator "IN" and the dataset filter value = Parameter, but I just get an error on the dataset filter
    (cannot evaluate filter expression error)

    Hello,
    Mulitple expressions added to SSRS dataset filter are evaluated as AND (Expr1 AND Expr1 AND Expr3). If you are looking for a OR like Expr1 Or Expr2 Or Expr3 then you can use this solution explained below.
    Dataset Query used for this test:
    select *
    from (values ('Row1',1,1,4),('Row2',2,1,3),('Row3',3,1,2),('Row4',3,2,2),('Row5',5,3,2),('Row6',5,6,7),('Row7',2,6,7)) x(DataRow,A,B,C)
    Report Parameter :
    Defined a multi select report parameter named "Parameter1" with string datatype and added values 1, 2, 3.
    Dataset Filter Expression:
    =Filter(Parameters!Parameter1.Value,CStr(Fields!A.Value)).Length + Filter(Parameters!Parameter1.Value,CStr(Fields!B.Value)).Length + Filter(Parameters!Parameter1.Value,CStr(Fields!C.Value)).Length
    The expression above uses the Filter function in SSRS to check if the field A\B\C has any match in the parameter1 mutli select parameter. If yes the length property will return a value > 0. Repeat the expression for all the other fields and add the Values
    for length property.
    Use > operator in the filter dialogue box
    and value as 0 as shown in the snapshot below.
    The output is shown below. Row 6 is missing as Field A, B or C doesnt have 1, 2,3 as values. If this is the output you are looking for this solution should work for you.
    --sIbu

  • Dynamically generating the ssrs dataset and filling the data into the dataset and binding it to ssrs report dynamically

    I have a work to do, in ssrs we are using server reports in our project. i am looking for dynamically generating the ssrs dataset and filling the data into the dataset and binding the dataset to ssrs report(RDL) dynamically.
    Getting the dataset dynamically has a solution by using Report Definition Customization Extension (RDCE), but the problem is binding that dataset to the report(RDL) dynamically was not there.
    Here is the reference for RDCE http://www.codeproject.com/Articles/355461/Dynamically-Pointing-to-Shared-Data-Sources-on-SQL#6
    I looked for binding the dataset to the report(RDL) dynamically and searched many sites but i did not get the solution. Can anyone help me here.
    Is there any custom assemblies or any Custom data processing extensions to work around. Please help.
    Thanks in advance

    Hi Prabha2233,
    Thank you for your question.
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
    Thank you for your understanding and support.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • SSRS DataSet Filters

    I have a dataset for a report - by default the report shows "all" by using "NULL" as the value in the procedure.
    Snippet from SPROC
    Where....
    ISNULL(r.USER,
    'Unknown')
    = @USER
    OR @USER
    IS
    NULL)
    In the RowGroups where I would like to have my report only dispaly the users toggled by the paramater...I have this expression...
    =iif(Fields!USER.Value =Parameters!USER.Value,False,
    True)
    It is not working!!! can someone help?
    KDW

    Hi KDW,
    Based on my test, I think I have known the issue you are occurring. When you have done all the steps you said, the report only display Null users for USER filed when you select NULL value as the USER parameter value. Have I guessed it right?
    When we use the statement “( ISNULL(r.USER, 'Unknown') = @USER OR @USER IS NULL)” in the where clause of dataset query, it already add a filter to the dataset to only display the users toggled by the parameter. And when we select NULL value as the USER parameter
    value, it shows all users in the report. We needn’t add the expression to filter again. In the expression, it only show the values when USER
    value=@USER value. The NULL value is NULL value, it couldn’t stands for all values. So you should change the Visibility to Show in the Row Groups.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click here. 
    Katherine Xiong
    TechNet Community Support

  • SSRS Dataset Filter expression query

    I have an SSRS report which has a simple dataset and accepts two date parameters, and filters the results based on a Position parameter. The Position parameter filter is:
    Expression: Position
    Operator: In
    Value: [@Position]
    I have now been told that each position has a few other aliases in the database against the Position column. i.e. For a Position of "Contractor" I now also need to return "Consultant" records, based on the same field. Note, only one Position
    can be selected at a time.
    I imagine I have to update the Value expression above to do something like:
    - When @Position in "Contractor" also return rows where Position is x, y, z (I am happy to hard code these)
    I have about 10 Positions each with one or more aliases - can someone help guide me on how to set up the expression?
    Thanks!

    Thanks Ione.
    Ok - I have set my parameter values in the value box, comma separated
    My dataset filter for the param Operator is set to IN and the value [@Position]
    However where I have multiple values set against a position I do not get any results (there is data in the DB)
    Do I need to do something different when setting the paramter values? i.e. use the expression and then a function to parse the comman separted values
    Or - something in the Filter to make the expression parse the incoming paramter?
    Thanks again

  • 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

  • SSRS multi value parameter expansion invalidates query syntax

    These results from from running a demo solution and profiling the server.
    --- here is the text of the query saved in the report's design ---
    select *
    from test_ssl
    where [who] in(case when @P1 = 'all' then [who] else @P1 end)
        and [recid] in(case when @P2 = 'all' then [recid] else @P2 end)
    Executing the report works when @P1 = ‘all’, @P2 = ‘all’
    ---------------------------------------- as executed at the server ---------------------------
    (@P1 nvarchar(3),@P2 nvarchar(3))
    select *
    from test_ssl
    where [who] in(case when @P1 = 'all' then [who] else @P1 end)
        and [recid] in(case when @P2 = 'all' then [recid] else @P2 end)
    Executing the report fails when @P1 = (‘kid’,’adult’) & @P2 = ‘all’
        An error has occurred during report processing. (rsProcessingAborted)
        Query execution failed for dataset 'DataSet1'. (rsErrorExecutingCommand)
        For more information about this error navigate to the report server on the local server machine, or enable remote errors
    ---------------------------------------- as executed at the server ---------------------------
    exec sp_executesql
    N'select *
    from test_ssl
    where [who] in(case when N''kid'',N''adult'' = ''all'' then [who] else
    N''kid'',N''adult'' end)
        and [recid] in(case when @P2 = ''all'' then [recid] else @P2 end)
    ', N'@P2 nvarchar(3)', @P2=N'all'
    SSRS expanded @P1 into its values then substituted @P1 with 'kid','adult' in the query's text, then sent the text to SQL server using sp_executesql().
    This substitution invalidates the SQL syntax.  The report fails.
    For me to implement this simple example with only 2 parameters in separate queries in the report where @P1 &/ @P2 can each separately be {= 'all', or 1 value, or more than 1 value} will take 4 separate queries.
    Query1: IF @P1 = all, @P2 = all BEGIN ... query text 1 ... END
    Query2: IF @P1 != all, @P2 = all BEGIN ... query text 2 ... END
    Query3: IF @P1 = all, @P2 != all BEGIN ... query text 3 ... END
    and
    Query4: IF @P1 != all, @P2 != all BEGIN ... query text 3 ... END
    Each query will have to have a unique WHERE clause.
    In my actual work problem some reports take 8 parameters that will be either 'all', 1 value, or multiple values.
    This means that the report will have to have 64 queries each with its own unique WHERE clause and each query wrapped with its own IF @P..... = 'all' BEGIN ... query text ... END
    Who knows what to do about this issue?
    Hello!

    Hi Stevesl,
    I have tested on my local environment and the query is invalid.
    As
    Jan Pieter Posthuma mentioned that you can just add filter as below in the query, when you set the "Allow multiple values" in the parameter, you will got the "Select All" in the dropdown list, so there is no need to add "all"
    again.
    select * from test_ssl
    where [who] in(@P1) and [recid] in(@P2)
    You can also add filter in the dataset, details information below for your reference:
    By default we can add many filters and the default logic between these filter is "And" and if you want to add some "Or" filters you can reference to the blog below:
    FAQ: How do I implement OR logic or complicated logics for filters in a SSRS report?
    Details information about filter in SSRS :
    Add a Filter to a Dataset (Report Builder and SSRS)
    Because you have a lot of parameters and you can consider add the cascading parameters:
    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

  • SSRS Dataset Column MetaData dynamic Update

    Hi All,
    I  have report which is dynamically pivoting columns    in the query ,i need to update those dynamic  columns on the ssrs    column metadata fields on the data set,cross tabbing using tablix doesn't work for my logic  ,is
    there any way ,the  column names  can be updated when  new columns get added .
    As an example 
    If my dataset query is dynamically pivoting sales data against months    when month changes, i need the new month to be update in the data set fields 
    Region1   Product1    Sept Oct
    Region1 Product2 Sep Oct Nov
    Many Thanks
    Chandra 

    Hi DataPro2010,
    According to your description that you have columns(Month) which need to update in the DB sometime, so this fields need to update in the report too, you try to use pivot function in the query to make them update dynamically on the report but failed, right?
    I have tested on my local environment and we can make it dynamic increase by using the matrix, you have mentioned matrix not support the logic, I think you problem can be caused by the wrong way you design the matrix, you can use the unpivot function to
    turn the column name of month to a single row and create an matrix to put the month name in the column group ,Details information for your reference:
    1.  Put the query below to the dataset:
    SELECT Region, Product, Col , Amount
    FROM
    select Region, Product,Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,….Coln from case1111
    )a
    UNPIVOT(Amount FOR Col IN (Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,..Coln) ) p   
    Note: Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,….Coln :this part need to update every time you have added an column of month in the DB.
    2.  Create an matrix and design the report as below
    If you have some other fields which will not dynamic increase, you can insert these fields the same way as [Product] (Product is added as the inside group of Region,[Col] will display the month name)
    3.  Every time you have added an column in the DB, remember to update the query by adding this column  in the step1 too, and then the matrix will be update automatically.
    There is also another method to design the column (Not using the Matrix)by using the parameter to control the dynamical increase for your reference:
    http://www.codeproject.com/Articles/11254/SQL-Reporting-Services-with-Dynamic-Column-Reports
    Any problem, please feel free to ask
    Regards
    Vicky Liu

  • SSRS Dataset Filter Operator

    Hi --
    I have a Dataset which returns data based on a multi select parameter. It uses a filter to achieve this and works as expected (based on the IN Operator).
    Now I have to update the report so it also returns records for this parameter value which are NULL - Is it possible to achieve this using an expression/filter within the report, or do I have to get the DBA's to review and update the back-end stored
    procs?
    Thanks

    Thanks Visakh16 -- Sorry, but to add to this..
    I need to allow the user the option to include blank values, or not. Therefore I have added a new parameter "also include blank projects", a yes/no drop down.
    I currently bring back the complete dataset, which is then filtered by the multi select projects param - but how do I get the new parameter ("include blank records") to bring back the selected projects AND records where the Projects field is NULL
    if the new param is equal to Yes?

  • 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

  • Stored Proc with SSRS multi value parameter gives " Must Declare scalar Varaiable @StateID

    Hi All,
    I have one stored proc with @fromDate , @Todate and multivalue input
    parameter@StateID of type integer.
    When I run below stored proc via SSRS by selecting multiple values thru multiValue parameter into @StateID...it gives error saying "Must Declare scalar variable @StateID"
    Not sure what is wrong with the input parameters.
    ID is Integer type in all the 3 tables - dbo.EastCities, dbo.WestCities  , dbo.Country
    I need help fixing this  "Must Declare scalar variable @StateID" error
    This is the UDF split() I am using..
    Function:
    CREATE FUNCTION dbo.SplitStateID
    (    @List VARCHAR(MAX))
    RETURNS TABLE
    AS   
    RETURN   
    (        SELECT DISTINCT [Value] = CONVERT(INT, LTRIM(RTRIM(CONVERT( VARCHAR(12),SUBSTRING(@List, Number, CHARINDEX(',', @List + ',', Number) - Number))))
     FROM  dbo.Numbers       
     WHERE Number <= CONVERT(INT, LEN(@List))AND SUBSTRING(',' + @List, Number, 1) = ','    );
     GO
     SELECT [Value] FROM dbo.SplitStateID('10,30,50');
    Also, I have created dbo.Numbers table which is used in udf..
    reference url -- > 
    http://sqlblog.com/blogs/aaron_bertrand/archive/2009/08/01/processing-a-list-of-integers-my-approach.aspx
    SET NOCOUNT ON;
    DECLARE @UpperLimit INT;
    SET @UpperLimit = 10000;
    WITH n AS(   
    SELECT        rn = ROW_NUMBER() OVER        (ORDER BY s1.[object_id])   
    FROM sys.objects AS s1   
    CROSS JOIN sys.objects AS s2   
    CROSS JOIN sys.objects AS s3)
    SELECT [Number] = rn - 1
    INTO dbo.Numbers FROM n
    WHERE rn <= @UpperLimit + 1;
    CREATE UNIQUE CLUSTERED INDEX n ON dbo.Numbers([Number]);
    Stored procedure:
    Create Procedure dbo.CountrySelection
    ( @FromDate Date, @ToDate Date, @StateID Int)
    AS
    BEGIN
    set nocount on;
    SELECT * INTO #EastCities
    FROM (
    SELECT ID,Description from dbo.EastCities
    Where ID IN (SELECT Value from dbo.SplitStateID(@StateID))
    ) AS A
    SELECT * INTO #WestCities
    FROM (
    SELECT ID,Description from dbo.WestCities
    Where ID IN (SELECT Value from dbo.SplitStateID(@StateID))
    ) AS B
    SELECT * INTO #Country
    FROM (
    SELECT ID , Description, State,Country From dbo.Country
    ) AS C
    SELECT EC.ID AS East, WC.ID AS West , EC.Description AS EastDesc, WC.Description AS WestDesc, CT.State, CT.Country
    FROM #Country CT
    LEFT JOIN #EastCities EC ON CT.ID=EC.ID
    LEFT JOIN #WestCities WC ON CT.ID=WC.ID
    DROP TABLE #EastCities
    DROP TABLE #WestCities
    DROP TABLE #Country
    END
    Above 3 temp tables are joined by #Country.ID key
    It works fine when single value is passed in @StateID
    Exec dbo.CountrySelection '01/01/2010','02/01/2010',10
    It fails when multi value passed into @StateID
    Exec dbo.CountrySelection '01/01/2010','02/01/2010','10,30,40'
    SSRS error log shows "Must declare scalar variable @StateID"
    Need help in fixing this issue.
    Thanks,
    RH
    sql

    Visakh,
    I changed @StateID date type to varchar(max) and still I get this error.  
    System.Data.SqlClient.SqlException: Must declare the scalar variable "@StateID".
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    I am running this SO in SSRS quert Type =Text
    Actually sp created on db2 database and due to some limitations I am running(via SSRS) this from different db1 database data source within the same db server. When I run this sp from SSRS query designer(edit query designer button) and pass
    multivalue parameters to @StateID as 10 , 20 it works and gives expected resultset.
    Thanks,
    RH
    sql

  • 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

  • Filtering on dataset not working on server

    Hi,
    I have a report that works fine during local development however when it is deployed to a server it is not displaying values in the parameter list, Unit.  This list comes from a dataset that is filtered by a parameter called ADAuthorizations.  I've
    verified ADAuthorizations has a value on the server and we've verified that the data for the dataset is returning from the SQL Server.  It appears that something might be wrong in the filtering of the dataset with ADAuthorizations or is not displaying
    for some reason.  Does anyone have some suggestions on why this report behaves differently on the server and how to fix it?
    The dataset has an expression of UserId, an operator of In, and a value of ADAuthorizations.  ADAuthorizations is an array of values.
    Thanks,
    Robert

    Hi Qiuyun,
    The report is on a sharepoint server and uses a shared datasource.  We've verified it is sending back the data from the SQL Server using network tracing.  I've run the reports in Chrome and IE with the same result on the report.  The available
    values are set to none but the default values call a custom dll to look up a user's Active Directory groups which returns an array of strings.  I also set the available values to call the dll which has no effect on the server but locally it duplicates
    one of the values in drop down list.
    I recently noticed if I view source on the report I see the error below but the report doesn't display this error.  Might this be related?  The server admin says he doesn't see this error in the logs.
    Report Viewer Configuration Error
    </h2><p>The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file.  Add &lt;add verb=&quot;*&quot; path=&quot;Reserved.ReportViewerWebPart.axd&quot;
    type = &quot;Microsoft.ReportingServices.SharePoint.UI.WebParts.WebPartHttpHandler, Microsoft.ReportingServices.SharePoint.UI.WebParts, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91&quot; /&gt; to the system.web/httpHandlers
    section of the web.config file, or add &lt;add name=&quot;ReportViewerWebControlHandler&quot; preCondition=&quot;integratedMode&quot; verb=&quot;*&quot; path=&quot;Reserved.ReportViewerWebPart.axd&quot; type=&quot;Microsoft.ReportingServices.SharePoint.UI.WebParts.WebPartHttpHandler,
    Microsoft.ReportingServices.SharePoint.UI.WebParts, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91&quot; /&gt; to the system.webServer/handlers section for Internet Information Services 7 or later.</p>
    Thanks,
    Robert

Maybe you are looking for

  • Problems while inserting data into Oracle10g RDF store

    hi I ran into this error again after it was fixed last time. Even this time it was the same error ID: 9777 Error: java.sql.SQLException: ORA-13199: RDF:Error occurred ORA-06512: at "MDSYS.MD", line 1723 ORA-06512: at "MDSYS.MDERR", line 17 ORA-06512:

  • I cannot open mail log in page

    I cannot open the log in page (user name and password) for hotmail from msn home page. I just loaded firefox 8 on my computer. Firefox 7 worked fine.

  • Help menu in safari and Mac help do not work

    Hi frens, Am very new to apple... having made the switch a month ago. I use the HELP menu a lot but since yesterday the menu option for safari and also MAc help will not pen. The other menu options are fine. Please advise me on what to do Raj

  • Desktop Manager version 6 - TOTAL CRASH

    I have just bought a new laptop (Sony Vaio running Windows 7 and Microsoft Outlook 2010). I am using the Blackberry 8900 Curve with  Vodafone. Like everyone else, I could not synchronise my blackberry with Outlook 2010 and was told to wait until Augu

  • Should I install Crystal Reports Enterprise SP01 or SP03?

    Hi All We are using BO 4.1 SP02 and are now getting round to installing Crystal Reports Enterprise. I have two questions I can't find answers for: 1. Should I be installing SP01 or SP03 of CRE. Our BO platform is SP02, but there is no CRE SP02, so I