I have the following SP which works correctly when ran on its own:
USE [Orders]
GO
SET FMTONLY OFF;
CREATE PROCEDURE [dbo].[Get_Details_by_Type]
@isArchiv
Don't mean to revive a dead thread but was driving me crazy when upgrading our reports from SSRS 2005 to SSRS 2016 where Stored Procedures used openquery.
We narrowed it down to reports that had fields with empty values in. So we added this at the start of the Stored Procedure:
SET CONCAT_NULL_YIELDS_NULL OFF;
which meant we didn't need to CAST every field.