sql-server-2008reporting-servicesvisual-studio-2015ssmsarithabort

SSRS giving me an error but the query works perfectly in SSMS


My query that i have been working on for quite some time finally works. I have been working on it to implement it into a SSRS report. However when attempting to copy paste the query into a dataset i receive the following error :

SELECT failed because the following SET options have incorrect settings: 'ARITHABORT'.
Verify that SET options are correct for use with indexed views and/or indexes on computed
columns and/or filtered indexes and/or query notifications and/or XML data type methods
and/or spatial index operations.

Now Arithabort is set to on in the database. This i am sure of. Is ssrs not able to use arithabort?

Here is my query:

SELECT DISTINCT WORK_ORDER.PART_ID, OPERATION.SEQUENCE_NO, OPERATION.RESOURCE_ID, OPERATION.SETUP_HRS, OPERATION.RUN_HRS, 
    OPERATION.OPERATION_TYPE, OPERATION.RUN AS PCS_HR, REPLACE(CONVERT(VARCHAR(150), CONVERT(BINARY(150), OPERATION_BINARY.BITS)), CHAR(0), '') 
    AS Specs_OPR, OPERATION.WORKORDER_BASE_ID, OPERATION.WORKORDER_LOT_ID, OPERATION.WORKORDER_SPLIT_ID, 
    OPERATION.WORKORDER_SUB_ID, OPERATION.LOAD_SIZE_QTY, OPERATION.CALC_START_QTY, OPERATION.COMPLETED_QTY,
    (CEILING(OPERATION.CALC_START_QTY / OPERATION.LOAD_SIZE_QTY)) AS NUM_O_LOADS, ((OPERATION.CALC_START_QTY-OPERATION.COMPLETED_QTY)/OPERATION.LOAD_SIZE_QTY) AS LOADS_REMAINING, 

    (SELECT DISTINCT descriptions = STUFF((
        SELECT ', '  + CHAR(13) +  PART.DESCRIPTION FROM dbo.PART JOIN REQUIREMENT ON PART.ID = REQUIREMENT.PART_ID
        WHERE REQUIREMENT.WORKORDER_BASE_ID = '026877' AND REQUIREMENT.OPERATION_SEQ_NO = OPERATION.SEQUENCE_NO
        FOR XML PATH(''), TYPE).value('.[1]', 'nvarchar(max)'), 1, 2, '')
    FROM (REQUIREMENT R JOIN PART P ON R.PART_ID = P.ID)) AS PART_DESCRIPTION

FROM OPERATION
    INNER JOIN WORK_ORDER
        ON OPERATION.WORKORDER_TYPE = WORK_ORDER.TYPE AND OPERATION.WORKORDER_BASE_ID = WORK_ORDER.BASE_ID AND 
            OPERATION.WORKORDER_LOT_ID = WORK_ORDER.LOT_ID AND OPERATION.WORKORDER_SPLIT_ID = WORK_ORDER.SPLIT_ID AND 
            OPERATION.WORKORDER_SUB_ID = WORK_ORDER.SUB_ID
    INNER JOIN OPERATION_BINARY
        ON OPERATION.WORKORDER_TYPE = OPERATION_BINARY.WORKORDER_TYPE AND 
            OPERATION.WORKORDER_BASE_ID = OPERATION_BINARY.WORKORDER_BASE_ID AND 
            OPERATION.WORKORDER_LOT_ID = OPERATION_BINARY.WORKORDER_LOT_ID AND 
            OPERATION.WORKORDER_SPLIT_ID = OPERATION_BINARY.WORKORDER_SPLIT_ID AND 
            OPERATION.WORKORDER_SUB_ID = OPERATION_BINARY.WORKORDER_SUB_ID AND 
            OPERATION.SEQUENCE_NO = OPERATION_BINARY.SEQUENCE_NO
    JOIN REQUIREMENT
        ON REQUIREMENT.WORKORDER_BASE_ID = OPERATION.WORKORDER_BASE_ID
WHERE (REPLACE(CONVERT(VARCHAR(8000), CONVERT(BINARY(8000), OPERATION_BINARY.BITS)), CHAR(0), '') 
    NOT LIKE '%Gupta%') AND OPERATION.WORKORDER_BASE_ID = '026877' AND WORK_ORDER.BASE_ID = '026877'

Solution

  • The answer i found was: right click your database click properties > Options > miscellaneous then change arithmetic abort setting from false to true.