Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Dynamics CRM 2016: Problem while using Pre-Filtering in SSRS reports

$
0
0

I've following query that work well untill I am not using CRMAF_ as soon as I put pre filter the report stop working and throw exception. I am not finding way to solve it, any suggestions?

Query

DECLARE @SQL nvarchar(4000)

SET @SQL = 'DECLARE @SL nvarchar(500);
SELECT @SL = COALESCE(@SL + '', '', '''') +
Seller FROM (SELECT new_lastname,
CASE new_deceased WHEN 0 THEN COALESCE(new_name, '''') + '' '' + COALESCE(new_middlename, '''') + '' '' + COALESCE(new_lastname, '''')
WHEN 1 THEN COALESCE(new_name, '''') + '' '' + COALESCE(new_middlename, '''') + '' '' + COALESCE(new_lastname, '''') + '' (D)''
END AS Seller FROM FilteredNew_party INNER JOIN FilteredSalesOrder AS FilteredSalesOrder ON FilteredNew_party.new_order = FilteredSalesOrder.salesorderid WHERE new_partytype = 2) T ORDER BY new_lastname; SELECT @SL as SellerList'

EXEC (@SQL)

Exception



Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>