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

Add Temp Table to Report as Filler for Matrix

$
0
0

I'm trying to add a temp table to a CRM report to back fill 0 values for a matrix report.  Anytime I add the temp table, the report stops working with a generic "An error has occurred during report processing.

Query execution failed for dataset 'DSMain'.

For more information about this error navigate to the report server on the local server machine, or enable remote errors "

The SQL statements all work outside CRM.  I've even trimmed it down to where I just create the temp table and insert records without using it further in the report and that doesn't work.

Here is my temp table statement:

 CREATE TABLE #RevFiller

     (

     productname nvarchar(20) COLLATE Latin1_General_CI_AI,

     product nvarchar(20) COLLATE Latin1_General_CI_AI,

     yearname int NULL,

     year int NULL,

     monthname nvarchar(20) COLLATE Latin1_General_CI_AI,

     month nvarchar(20) COLLATE Latin1_General_CI_AI,

     revenue_base int NULL,

     moneyformatstring nvarchar(60) COLLATE Latin1_General_CI_AI,

     revenue int NULL,

     name nvarchar(20) COLLATE Latin1_General_CI_AI,

     revenuebymonthid int NULL

     )

Here is the insert:

     INSERT INTO #RevFiller(productname,

     product,

     yearname,

     year,

     monthname,

     month,

     revenue_base,

     moneyformatstring,

     revenue,

     name,

     revenuebymonthid)

     select DISTINCT product AS productname

     ,product AS product

     ,fisyear AS yearname

     ,fisyear AS year

     ,fismonth AS monthname

     ,fismonth AS month

     ,0 AS revenue_base

     ,'"$"###,###,###,##0.00;("$"###,###,###,##0.00);"$"0.00' AS moneyformatstring

     ,0 AS revenue

     ,name

     ,0 AS revenuebymonthid

FROM revenuebymonth

     WHERE (revenuebymonth.fisyear between '2011' and '2013')

Does CRM have some sort of report timeout that stops the processing?


Viewing all articles
Browse latest Browse all 82002

Trending Articles



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