<?xml version="1.0" encoding="utf-8"?>
<rss
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 version="2.0">
<channel>
<title>Customer Effective Blog</title>
<link>http://blog.CustomerEffective.com/blog/</link>
<description>Microsoft Dynamics CRM Blog from Customer Effective, CRM Experts and a Microsoft Inner Circle partner.</description>
<language>en-US</language>
<lastBuildDate>Fri, 17 Feb 2012 08:39:00 -0500</lastBuildDate>
<generator>http://www.typepad.com/</generator>

<item>
<title>Syntax when using CTE&amp;rsquo;s in an SSRS Report Dataset for Microsoft Dynamics CRM</title>
<link>http://blog.CustomerEffective.com/blog/2011/12/syntax-when-using-ctes-in-an-ssrs-report-dataset.html</link>
<guid isPermaLink="true">http://blog.CustomerEffective.com/blog/2011/12/syntax-when-using-ctes-in-an-ssrs-report-dataset.html</guid>
<description>CTE’s (Common Table Equivalent) are very useful when writing complex SQL queries. I recently used one in a dataset in a report. This was a secondary dataset that I was appending to an existing report which was already in CRM...</description>


<content:encoded>&lt;p&gt;CTE’s (Common Table Equivalent) are very useful when writing complex SQL queries.&amp;#0160; I recently used one in a dataset in a report.&amp;#0160; This was a secondary dataset that I was appending to an existing report which was already in CRM and worked correctly.&amp;#0160; Designing and testing the reports in Visual Studio worked as well.&amp;#0160; Only after uploading and running the report from within Microsoft CRM did I get an error naming the dataset as the culprit.&lt;/p&gt;
&lt;p&gt;I suspected the CTE to be culprit as the dataset query was working fine.&amp;#0160; Thanks to a bright and esteemed colleague of mine, the answer was provided to me.&amp;#0160; A semicolon ( ; ) must be inserted before your WITH expression.&lt;/p&gt;
&lt;p&gt;Incorrect   &lt;br /&gt;WITH RepIDs as (Select * FROM SystemUser …)&lt;/p&gt;
&lt;p&gt;Correct   &lt;br /&gt;;WITH RepIDS as (Select * FROM SystemUser …)    &lt;br /&gt; &lt;br /&gt;I updated my dataset, saved the report to Microsoft CRM, and ran the report successfully.&lt;/p&gt;</content:encoded>



<dc:creator>Mark Weilandt</dc:creator>
<pubDate>Wed, 21 Dec 2011 09:36:09 -0500</pubDate>

</item>

</channel>
</rss>

<!-- ph=1 -->

