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

Pre-filtered SQL Reports not working

$
0
0

I'm using CRM 2013 On Premise, Reporting Services 2012.  I have never been able to get the Pre-Filtering to work, a Default Filter is never created.

Here is a simple report that I have tried:

SELECT DISTINCT AccountNumber, Name, AccountNumber + ' - ' + Name AS Account
FROM [REPORT2].[BPCRM_MSCRM].[dbo].[FilteredAccount] AS CRMAF_FilteredAccount

Ultimately I want the below code to generate from within the Account Entity.

SELECT DISTINCT [CUSTOMER_ID]
      ,[CUSTOMER_NAME]
      ,[ROLLING_12_DATE_PERIOD]
      ,[SALES]
      ,[LINES]
      ,[RUNDATE]
   ,LABEL =
  CASE WHEN ROLLING_12_DATE_PERIOD = '1 - TTM' THEN 'TTM - Trailing 12 Months'
   ELSE
  CASE WHEN ROLLING_12_DATE_PERIOD = '2 - PTM' THEN 'PTM - Prior 12 Months'
   ELSE
  CASE WHEN ROLLING_12_DATE_PERIOD = '3 - 2YPTM' THEN '2YPTM - 2 Years Prior Trailing 12 Months'
   ELSE
  CASE WHEN ROLLING_12_DATE_PERIOD = '4 - 3YPTM' THEN '3YPTM - 3 Years Prior Trailing 12 Months'
  END
  END
  END
  END
  FROM [BPC_DW].[dbo].[result_tbl_ACCOUNT_TRENDS_BY_ACCOUNT] AT
  INNER JOIN
  (SELECT DISTINCT AccountNumber, Name, AccountNumber + ' - ' + Name AS Account
 FROM [BPCRM_MSCRM].[dbo].[FilteredAccount] AS CRMAF_FilteredAccount
 ) AS FilteredAccount ON
 AT.[CUSTOMER_ID] collate SQL_Latin1_General_CP1_CI_AS  = AccountNumber


Viewing all articles
Browse latest Browse all 55831

Trending Articles