<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Victoria Yudin</title>
	<atom:link href="http://victoriayudin.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://victoriayudin.com</link>
	<description>Ramblings and musings of a Dynamics GP MVP</description>
	<lastBuildDate>Sat, 19 May 2012 09:34:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='victoriayudin.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/3cb782884f1419245af3e8375b2a1bff?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Victoria Yudin</title>
		<link>http://victoriayudin.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://victoriayudin.com/osd.xml" title="Victoria Yudin" />
	<atom:link rel='hub' href='http://victoriayudin.com/?pushpress=hub'/>
		<item>
		<title>Finding resources</title>
		<link>http://victoriayudin.com/2012/05/12/finding-resources/</link>
		<comments>http://victoriayudin.com/2012/05/12/finding-resources/#comments</comments>
		<pubDate>Sat, 12 May 2012 09:12:58 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[FRx]]></category>
		<category><![CDATA[Management Reporter]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=4139</guid>
		<description><![CDATA[Almost on a daily basis I find myself looking for things like system requirements, end of support dates, build numbers and downloads for the various products that I work with. Even though search engines have greatly improved over the last few years, I still often struggle to find this information. While I consider myself to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=4139&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Almost on a daily basis I find myself looking for things like system requirements, end of support dates, build numbers and downloads for the various products that I work with. Even though search engines have greatly improved over the last few years, I still often struggle to find this information. While I consider myself to be a Google-ninja in training, I find that it is much easier to save links to resources as I find them rather than counting on being able to find them easily next time I need them.</p>
<p style="text-align:justify;">One of the reasons I originally started this blog was to create a place to keep and organize all these resources. Since there are a lot of new versions coming out (GP, SQL, MR) I have been updating the lists on this blog and wanted to post a little refresher for all my readers on how to find these resources.</p>
<p style="text-align:justify;">I have tried to organize by product and then version where applicable. I have also tried to put cross-links and menus everywhere I can. One of the easiest ways to find resources on my blog is to click on the Resources link at the top of this blog:</p>
<p style="text-align:center;"><a href="http://victoriayudin.files.wordpress.com/2012/05/resources-menu1.png"><img class="size-full wp-image-4161 aligncenter" title="resources menu" src="http://victoriayudin.files.wordpress.com/2012/05/resources-menu1.png?w=450&h=283" alt="" width="450" height="283" /></a></p>
<p style="text-align:justify;">From here, if you are looking for a particular product, you can quickly choose an option and go directly to the page with links for it:</p>
<p style="text-align:center;"><a href="http://victoriayudin.files.wordpress.com/2012/05/gp-2010-page.png"><img class="size-full wp-image-4142 aligncenter" title="GP 2010 page" src="http://victoriayudin.files.wordpress.com/2012/05/gp-2010-page.png?w=450&h=508" alt="" width="450" height="508" /></a></p>
<p style="text-align:justify;">If you&#8217;re looking for more generic Dynamics GP links, choose <a title="Dynamics GP Resources" href="http://victoriayudin.com/resources/dynamics-gp-resources/" target="_blank">Dynamics GP Resources</a> from the menu. There is also a page of links for <a title="SQL Server Resources" href="http://victoriayudin.com/resources/sql-server-resources/" target="_blank">SQL Server</a> and another for <a title="MR &amp; FRx Resources" href="http://victoriayudin.com/resources/mr-frx-resources/" target="_blank">Management Reporter &amp; FRx</a>.</p>
<p style="text-align:justify;">I will keep adding new useful links as I find them and adding new build numbers as they come out, but if you have useful links that you&#8217;d like to add to these lists, please let me know. In the meantime, some new, updated and useful links:</p>
<ul type="square">
<li style="padding-bottom:5px;"><a title="Dynamics GP support lifecycle" href="http://victoriayudin.com/2008/10/08/when-does-my-gp-products-support-end/" target="_self">Dynamics GP support lifecycle</a></li>
<li style="padding-bottom:5px;"><a title="GP 2013 Resources" href="http://victoriayudin.com/resources/gp-2013-resources/" target="_blank">Dynamics GP 2013 links</a></li>
<li style="padding-bottom:5px;"><a title="SQL Server versions" href="http://victoriayudin.com/2008/10/05/what-version-of-sql-server-am-i-running/" target="_self">SQL Server service packs and versions</a></li>
<li style="padding-bottom:5px;"><a title="SQL Server support lifecycle" href="http://victoriayudin.com/2008/10/29/when-does-my-sql-server-support-end/" target="_self">SQL Server support lifecycle</a></li>
<li style="padding-bottom:5px;"><a title="SQL 2012 Edition comparison" href="http://msdn.microsoft.com/en-us/library/cc645993.aspx" target="_blank">SQL 2012 edition comparison</a></li>
<li style="padding-bottom:5px;"><a title="SQL 2008 Hardware and Software Requirements" href="http://msdn.microsoft.com/en-us/library/ms143506.aspx" target="_blank">SQL 2012 hardware and software requirements</a></li>
<li style="padding-bottom:5px;"><a title="Microsoft Management Reporter 2012 Downloads" href="https://mbs.microsoft.com/customersource/downloads/servicepacks/MROverview.htm" target="_blank">Management Reporter 2012 downloads</a></li>
<li style="padding-bottom:5px;"><a title="Microsoft Management Reporter 2012: Installation, Migration, and Configuration Guides " href="http://www.microsoft.com/en-us/download/details.aspx?id=5916" target="_blank">Management Reporter 2012 installation, migration and configuration guides</a></li>
<li><a title="Management Reporter versions" href="http://victoriayudin.com/2011/07/04/management-reporter-versions/" target="_blank">Management Reporter versions</a></li>
</ul>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/frx/'>FRx</a>, <a href='http://victoriayudin.com/category/management-reporter/'>Management Reporter</a>, <a href='http://victoriayudin.com/category/sql-server/'>SQL Server</a> Tagged: <a href='http://victoriayudin.com/tag/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/tag/featured/'>featured</a>, <a href='http://victoriayudin.com/tag/frx/'>FRx</a>, <a href='http://victoriayudin.com/tag/management-reporter/'>Management Reporter</a>, <a href='http://victoriayudin.com/tag/sql-server/'>SQL Server</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/4139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/4139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/4139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/4139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/4139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/4139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/4139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/4139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/4139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/4139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/4139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/4139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/4139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/4139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=4139&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2012/05/12/finding-resources/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2012/05/binocularsguy.jpg?w=96" />
		<media:content url="http://victoriayudin.files.wordpress.com/2012/05/binocularsguy.jpg?w=96" medium="image">
			<media:title type="html">binoculars</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>

		<media:content url="http://victoriayudin.files.wordpress.com/2012/05/resources-menu1.png" medium="image">
			<media:title type="html">resources menu</media:title>
		</media:content>

		<media:content url="http://victoriayudin.files.wordpress.com/2012/05/gp-2010-page.png" medium="image">
			<media:title type="html">GP 2010 page</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for sales quantities by customer by item by year</title>
		<link>http://victoriayudin.com/2012/03/09/sql-view-for-sales-quantities-by-customer-by-item-by-year/</link>
		<comments>http://victoriayudin.com/2012/03/09/sql-view-for-sales-quantities-by-customer-by-item-by-year/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 14:02:12 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[Inventory SQL code]]></category>
		<category><![CDATA[SOP SQL code]]></category>
		<category><![CDATA[GP SQL view]]></category>
		<category><![CDATA[Inventory]]></category>
		<category><![CDATA[Sales Order Processing]]></category>
		<category><![CDATA[SQL code]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=4096</guid>
		<description><![CDATA[Seems like no many how many variations of sales reports there are, people will always want more. I recently had a request for something similar to my view for sales quantities by item by year, but also adding in the customer.  Below is code for a view to accomplish this. This view makes a number of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=4096&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Seems like no many how many variations of sales reports there are, people will always want more. I recently had a request for something similar to my <a title="SQL view for sales quantities by item by year" href="http://victoriayudin.com/2012/01/23/sql-view-for-sales-quantities-by-item-by-year-2/">view for sales quantities by item by year</a>, but also adding in the customer.  Below is code for a view to accomplish this. This view makes a number of assumptions (listed in the view comments in green), and I am hard coding years from 2003 through 2012 as well as adding an overall total column at the end. You can easily change the years or add new ones by following the example in my code.</p>
<p style="text-align:justify;">You can find more code like this on my <a title="SOP SQL Views" href="http://victoriayudin.com/gp-reports/sop-sql-views/">SOP SQL Views</a> and <a title="Inventory SQL Views" href="http://victoriayudin.com/gp-reports/inventory-sql-views/">Inventory SQL Views</a> pages. For additional GP reporting information and links, check out my <a title="GP Reports" href="http://victoriayudin.com/gp-reports/">GP Reports</a> page.</p>
<p><pre class="brush: sql;">

CREATE VIEW view_Sales_Qty_by_Customer_Item_Year
AS

--***********************************************************************************
--view_Sales_Qty_by_Customer_Item_Year
--Created Mar 9, 2012 by Victoria Yudin - Flexible Solutions, Inc.
--For updates see http://victoriayudin.com/gp-reports/
--Returns total sales quantities fulfilled (invoices - returns) for each item
--     by customer by year
--Only posted invoices and returns are included
--Quantity is calculated by multiplying by QTYBSUOM column in case other UofM's are
--     used on transations
--Voided transations are excluded
--Invoice/Return dates are used, not GL posting dates 
--Item Description is taken from Inventory Item Maintenance for all inventory items
--     and from SOP line items for non-inventory items
--***********************************************************************************

SELECT
C.CUSTNMBR Customer_ID, C.CUSTNAME Customer_Name,
D.ITEMNMBR Item_Number, D.Item_Description,
sum(case when year(D.DOCDATE) = 2003 then D.Qty else 0 end) as [Qty_in_2003],
sum(case when year(D.DOCDATE) = 2004 then D.Qty else 0 end) as [Qty_in_2004],
sum(case when year(D.DOCDATE) = 2005 then D.Qty else 0 end) as [Qty_in_2005],
sum(case when year(D.DOCDATE) = 2006 then D.Qty else 0 end) as [Qty_in_2006],
sum(case when year(D.DOCDATE) = 2007 then D.Qty else 0 end) as [Qty_in_2007],
sum(case when year(D.DOCDATE) = 2008 then D.Qty else 0 end) as [Qty_in_2008],
sum(case when year(D.DOCDATE) = 2009 then D.Qty else 0 end) as [Qty_in_2009],
sum(case when year(D.DOCDATE) = 2010 then D.Qty else 0 end) as [Qty_in_2010],
sum(case when year(D.DOCDATE) = 2011 then D.Qty else 0 end) as [Qty_in_2011],
sum(case when year(D.DOCDATE) = 2012 then D.Qty else 0 end) as [Qty_in_2012],
sum(D.Qty) Total_Qty

FROM
(SELECT SH.DOCDATE, SH.CUSTNMBR, SD.ITEMNMBR,
 coalesce(I.ITEMDESC, SD.ITEMDESC) Item_Description,
 CASE SD.SOPTYPE
     WHEN 3 THEN SD.QTYFULFI*QTYBSUOM
     WHEN 4 THEN SD.QUANTITY*QTYBSUOM*-1
     END Qty
 FROM SOP30200 SH
 INNER JOIN
     SOP30300 SD
     ON SD.SOPNUMBE = SH.SOPNUMBE
     AND SD.SOPTYPE = SH.SOPTYPE
 LEFT OUTER JOIN
     IV00101 I
     ON I.ITEMNMBR = SD.ITEMNMBR
 WHERE SH.VOIDSTTS = 0
     AND SH.SOPTYPE IN (3,4)
     AND SD.ITEMNMBR not like 'XXXXXXXXXXXXXXX%') D

LEFT OUTER JOIN RM00101 C
  ON C.CUSTNMBR = D.CUSTNMBR

GROUP BY D.ITEMNMBR, D.Item_Description, C.CUSTNMBR, C.CUSTNAME

GO
GRANT SELECT ON view_Sales_Qty_by_Customer_Item_Year TO DYNGRP
</pre></p>
<p style="text-align:justify;"><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a>, <a href='http://victoriayudin.com/category/gp-reports-code/inventory-sql-code/'>Inventory SQL code</a>, <a href='http://victoriayudin.com/category/gp-reports-code/sop-sql-code/'>SOP SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/gp-sql-view/'>GP SQL view</a>, <a href='http://victoriayudin.com/tag/inventory/'>Inventory</a>, <a href='http://victoriayudin.com/tag/sales-order-processing/'>Sales Order Processing</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/4096/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/4096/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/4096/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/4096/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/4096/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/4096/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/4096/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/4096/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/4096/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/4096/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/4096/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/4096/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/4096/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/4096/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=4096&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2012/03/09/sql-view-for-sales-quantities-by-customer-by-item-by-year/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2012/03/hand-truck.jpg?w=78" />
		<media:content url="http://victoriayudin.files.wordpress.com/2012/03/hand-truck.jpg?w=78" medium="image">
			<media:title type="html">hand truck</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>Emailing SOP invoices in GP 2010 made easy with GP Reports Viewer</title>
		<link>http://victoriayudin.com/2012/02/29/emailing-sop-invoices-in-gp-2010-made-easy-with-gp-reports-viewer/</link>
		<comments>http://victoriayudin.com/2012/02/29/emailing-sop-invoices-in-gp-2010-made-easy-with-gp-reports-viewer/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 14:51:52 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP 2010]]></category>
		<category><![CDATA[GP Reports Viewer]]></category>
		<category><![CDATA[SOP SQL code]]></category>
		<category><![CDATA[Sales Order Processing]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=4028</guid>
		<description><![CDATA[ Background / The Problem For many companies a long awaited new feature introduced with Dynamics GP 2010 was the ability to email SOP (Sales Order Processing) invoices directly from GP. Many of our customers have started to offer emailing of invoices to their customers and are seeing an increased number of requests for emailed invoices. However, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=4028&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3 style="text-align:center;"> <strong>Background / The Problem</strong></h3>
<p style="text-align:justify;">For many companies a long awaited new feature introduced with Dynamics GP 2010 was the ability to email SOP (Sales Order Processing) invoices directly from GP. Many of our customers have started to offer emailing of invoices to their customers and are seeing an increased number of requests for emailed invoices. However, something that we have heard many users complain about with GP&#8217;s new emailing options is how cumbersome it is to deal with both emailing and printing invoices. It&#8217;s easy if invoices are all printed or all emailed, but anything in-between requires a lot of manual sorting through records in GP or sorting through printed invoices to determine what needs to get mailed out.</p>
<h3 style="text-align:center;"> <strong>The Solution</strong></h3>
<p style="text-align:justify;">We have come up with a really great solution for this predicament using <a title="GP Reports Viewer" href="http://www.GPReportsViewer.com/gpreports.html http://www.GPReportsViewer.com/gpreports.html" target="_blank">GP Reports Viewer</a> and I wanted to share it in the hopes that others would find this useful. I will go over how to set this up in the section following this one, but once set up, here are the steps the user would take to email and print invoices without any additional manual work or conflicts <em>(please click on images to see them bigger if they are unclear)</em>:</p>
<ol>
<li style="text-align:justify;">Open Sales Batch Entry window and select your invoice batch</li>
<li>Click the Print icon</li>
<li style="text-align:justify;">Choose to include Invoices, Blank Paper for the Format, Send Documents in E-mail (and Reprint Previously Printed/Sent just in case): <a href="http://victoriayudin.files.wordpress.com/2012/02/emailing-invoices-02.png"><img class="aligncenter size-full wp-image-4032" title="emailing invoices 02" src="http://victoriayudin.files.wordpress.com/2012/02/emailing-invoices-02.png?w=450&h=195" alt="" width="450" height="195" /></a></li>
<li style="text-align:justify;">Click Print &#8211; this will email all the invoices that can be emailed and if there are any invoices in the batch that could not be emailed, you will get an exception report with 2 possible types of Exceptions: <a href="http://victoriayudin.files.wordpress.com/2012/02/emailing-invoices-01.png"><img class="aligncenter size-full wp-image-4035" title="emailing invoices 01" src="http://victoriayudin.files.wordpress.com/2012/02/emailing-invoices-01.png?w=450&h=122" alt="" width="450" height="122" /></a>
<ul>
<li>If a customer is set up for emailing but there was no valid email address, you will get a message saying “A To, Cc, or Bcc address could not be found”. For these customers you just need to fix the email address and re-email the invoices individually. There are typically not too many of these and you could prevent this by using my <a title="SQL view for SOP email setup in GP 2010" href="http://victoriayudin.com/2011/10/24/sql-view-for-sop-email-setup-in-gp-2010/" target="_blank">SOP email setup view</a> ahead of time to check for valid email addresses.</li>
<li>If a customer is not set up for emailing, you will get a message saying “This document type cannot be sent in e-mail for this customer”. You will see one of these messages for each invoice that needs to be printed and mailed. Here is where this gets very cumbersome out-of-the-box: if you then simply print your entire invoice batch to the printer, you would need to go through all the printed invoices one by one to pull out only the invoices you need to physically mail. While for small batches this may not be a huge deal, imagine if your batch had 250 invoices and you needed to mail 50 of them! Instead, to reprint only the invoices that need to be mailed, follow steps 5 through 8 below.</li>
</ul>
</li>
<li>Open Sales Batch Entry window and select your invoice batch</li>
<li>Click the Print icon</li>
<li style="text-align:justify;">Choose to include Invoices, <strong>Short Form</strong> for the Format (or any other format you want to set up for this, just not Blank Paper), Print Document and Reprint Previously Printed/Sent: <a href="http://victoriayudin.files.wordpress.com/2012/02/emailing-invoices-03.png"><img class="aligncenter size-full wp-image-4037" title="emailing invoices 03" src="http://victoriayudin.files.wordpress.com/2012/02/emailing-invoices-03.png?w=450&h=195" alt="" width="450" height="195" /></a></li>
<li style="text-align:justify;">Click Print &#8211; this will print only invoices for customers that are not set up for emailing invoices.</li>
</ol>
<h3 style="text-align:center;"><strong>Setup / Recipe</strong></h3>
<p>This solution relies on the following ingredients:</p>
<ol>
<li>Microsoft Dynamics GP 2010</li>
<li>Flexible Solutions&#8217; <a title="GP Reports Viewer" href="http://www.GPReportsViewer.com/gpreports.html http://www.GPReportsViewer.com/gpreports.html" target="_blank">GP Reports Viewer</a></li>
<li>Two versions of a Crystal or SSRS report for SOP invoices:
<ul>
<li>One version that prints for all customers (replacing the Blank Paper format of the SOP invoice)</li>
<li style="text-align:justify;">Another version that is a copy of the first, but only prints for customers that are not set up for emailing (replacing the Short Form format of the SOP invoice)</li>
</ul>
</li>
</ol>
<p style="text-align:justify;">To complete this solution you will need to set up GP Reports Viewer to replace your SOP invoices with your two reports by mapping them to the Blank Paper and Short Form formats. More information on setting up SOP replacement in GP Reports Viewer can be seen in <a title="GP Reports Viewer SOP reports demo video" href="http://www.GPReportsViewer.com/videos/gprv_sopreports/gprv_sopreports.htm" target="_blank">this demo video</a> and detailed step by step instructions are in the <a title="GP Reports Viewer User Guide" href="http://www.GPReportsViewer.com/downloads/GP%20Reports%20Viewer%20User%20Guide.pdf" target="_blank">GP Reports Viewer User Guide</a>.</p>
<p style="text-align:justify;">The only task left is to create a new version of your Crystal or SSRS report that only prints for customers not set up for emailing invoices:</p>
<h4 style="text-align:center;"><strong>Add data that determines whether each customer is set up for emailing</strong></h4>
<div style="text-align:justify;">Often a Crystal or SSRS report for SOP invoices will be based on a SQL view or stored procedure. In that case, to capture the information that determines whether the customer is set up for emailing SOP invoices, you will need to add the SY04905 table which holds the details for which documents are enabled for emailing for each customer and vendor. (More details about email tables are on my <a title="Company/System Tables" href="http://victoriayudin.com/gp-tables/companysystem-tables/" target="_blank">Company/System Tables page</a> and if you&#8217;re looking for more detail on email setup, please take a look at my <a title="SQL view for SOP email setup in GP 2010" href="http://victoriayudin.com/2011/10/24/sql-view-for-sop-email-setup-in-gp-2010/" target="_blank">SOP email setup view</a>.)  Below is sample code that can be used to link the customer e-mail setup for SOP invoices to your sales data (in table S in this example):</div>
<p><pre class="brush: sql;">
LEFT OUTER JOIN SY04905 EC --email card documents
ON S.CUSTNMBR = EC.EmailCardID AND EC.MODULE1 = 11 AND EC.EmailSeriesID = 3 AND EC.EmailDocumentID = 3
</pre></p>
<p>You will also need to add a field to the data you are selecting in your stored procedure or view, for example:</p>
<p><pre class="brush: sql;">
case coalesce(EC.EmailDocumentFormat,0)
 when 0 then 'Not Enabled'
 else 'Enabled'
 end Email_Invoice
</pre></p>
<p>If your invoice report is pointing directly to SQL tables, you can add a link to my  <a title="SQL view for SOP email setup in GP 2010" href="http://victoriayudin.com/2011/10/24/sql-view-for-sop-email-setup-in-gp-2010/" target="_blank">SOP email setup view</a>.</p>
<h4 style="text-align:center;"><strong>Add a restriction to your report so that it only prints for customers not set up for emailing invoices</strong></h4>
<p>In Crystal Reports you can add the following to your Record Selection formula:</p>
<p><pre class="brush: plain; light: true;">
and {view_Customer_SOP_Email_Setup.Email_Invoice} = &quot;Not Enabled&quot;
</pre></p>
<p style="text-align:justify;"><em>(Note that the example above is pointing to my <a title="SQL view for SOP email setup in GP 2010" href="http://victoriayudin.com/2011/10/24/sql-view-for-sop-email-setup-in-gp-2010/" target="_blank">SOP email setup view</a>, if you are using your own view or stored procedure, please change the name accordingly.)</em></p>
<p>In SSRS you can add the following to the WHERE clause for your dataset:</p>
<p><pre class="brush: plain; light: true;">
and (view_Customer_SOP_Email_Setup.Email_Invoice = &quot;Not Enabled&quot;)
</pre></p>
<p><em>(Note that the example above is pointing to my <a title="SQL view for SOP email setup in GP 2010" href="http://victoriayudin.com/2011/10/24/sql-view-for-sop-email-setup-in-gp-2010/" target="_blank">SOP email setup view</a>, if you are using your own view or stored procedure, please change the name accordingly.)</em></p>
<h3 style="text-align:center;"><strong>Conclusion</strong></h3>
<p>The end result of this is a much happier and more productive invoicing staff. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>For more information about GP Reports Viewer, please take a look at the <a title="GP Reports Viewer demo video" href="http://www.GPReportsViewer.com/videos/gprv_demomp4/gprv_demomp4.html" target="_blank">GP Reports Viewer demo video</a>.</p>
<p style="text-align:justify;"><em>Disclaimer: GP Reports Viewer is an add-on product for Dynamics GP that is created and sold by my company, Flexible Solutions. I may be slightly biased, but I think it is the best thing since sliced bread.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/crystal-reports/'>Crystal Reports</a>, <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-2010/'>GP 2010</a>, <a href='http://victoriayudin.com/category/gp-reports-viewer/'>GP Reports Viewer</a>, <a href='http://victoriayudin.com/category/gp-reports-code/sop-sql-code/'>SOP SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/tag/gp-2010/'>GP 2010</a>, <a href='http://victoriayudin.com/tag/gp-reports-viewer/'>GP Reports Viewer</a>, <a href='http://victoriayudin.com/tag/sales-order-processing/'>Sales Order Processing</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/4028/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/4028/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/4028/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/4028/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/4028/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/4028/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/4028/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/4028/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/4028/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/4028/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/4028/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/4028/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/4028/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/4028/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=4028&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2012/02/29/emailing-sop-invoices-in-gp-2010-made-easy-with-gp-reports-viewer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2012/02/orange-businessmen.jpg?w=128" />
		<media:content url="http://victoriayudin.files.wordpress.com/2012/02/orange-businessmen.jpg?w=128" medium="image">
			<media:title type="html">orange businessmen</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>

		<media:content url="http://victoriayudin.files.wordpress.com/2012/02/emailing-invoices-02.png" medium="image">
			<media:title type="html">emailing invoices 02</media:title>
		</media:content>

		<media:content url="http://victoriayudin.files.wordpress.com/2012/02/emailing-invoices-01.png" medium="image">
			<media:title type="html">emailing invoices 01</media:title>
		</media:content>

		<media:content url="http://victoriayudin.files.wordpress.com/2012/02/emailing-invoices-03.png" medium="image">
			<media:title type="html">emailing invoices 03</media:title>
		</media:content>
	</item>
		<item>
		<title>Microsoft Dynamics Mayhem</title>
		<link>http://victoriayudin.com/2012/02/12/microsoft-dynamics-mayhem/</link>
		<comments>http://victoriayudin.com/2012/02/12/microsoft-dynamics-mayhem/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 10:46:18 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=4004</guid>
		<description><![CDATA[February 2012 is Microsoft Dynamics Mayhem month over at Packt Publishing, the publishers of my Microsoft Dynamics GP 2010 Implementation book. What does this mean for you? If you have been waiting to pick up a copy of any of the Dynamics books (this includes GP, CRM, AX, NAV and even Sure Step), this is the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=4004&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.packtpub.com/news/microsoft-dynamics-mayhem"><img class="size-full wp-image-4007 alignnone" title="microsoftdynamicsmayhem1" src="http://victoriayudin.files.wordpress.com/2012/02/microsoftdynamicsmayhem11.png?w=450&h=166" alt="" width="450" height="166" /></a></p>
<p style="text-align:justify;">February 2012 is <a title="Packt Publishing Microsoft Dynamics Mayhem month" href="http://www.packtpub.com/news/microsoft-dynamics-mayhem" target="_blank">Microsoft Dynamics Mayhem month</a> over at Packt Publishing, the publishers of my <a title="Victoria Yudin - Microsoft Dynamics GP 2010 Implementation" href="https://www.packtpub.com/microsoft-dynamics-gp-2010-implementation/book" target="_blank">Microsoft Dynamics GP 2010 Implementation book</a>. What does this mean for you? If you have been waiting to pick up a copy of any of the Dynamics books (this includes GP, CRM, AX, NAV and even Sure Step), this is the time to do it &#8211; they are all on sale through the end of February.</p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/miscellaneous/'>Miscellaneous</a> Tagged: <a href='http://victoriayudin.com/tag/book/'>book</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/4004/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/4004/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/4004/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/4004/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/4004/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/4004/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/4004/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/4004/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/4004/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/4004/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/4004/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/4004/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/4004/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/4004/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=4004&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2012/02/12/microsoft-dynamics-mayhem/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2012/02/books.jpg?w=65" />
		<media:content url="http://victoriayudin.files.wordpress.com/2012/02/books.jpg?w=65" medium="image">
			<media:title type="html">3d small people - carrying books</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>

		<media:content url="http://victoriayudin.files.wordpress.com/2012/02/microsoftdynamicsmayhem11.png" medium="image">
			<media:title type="html">microsoftdynamicsmayhem1</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for current Receivables aging in Dynamics GP</title>
		<link>http://victoriayudin.com/2012/01/25/sql-view-for-current-receivables-aging-in-dynamics-gp/</link>
		<comments>http://victoriayudin.com/2012/01/25/sql-view-for-current-receivables-aging-in-dynamics-gp/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 09:33:00 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[Receivables SQL code]]></category>
		<category><![CDATA[GP SQL view]]></category>
		<category><![CDATA[Receivables]]></category>
		<category><![CDATA[SQL code]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3979</guid>
		<description><![CDATA[I have created a variation on my view that shows all unapplied Receivables transactions to show customer aging in buckets. This is only looking at functional currency and will return data in summary, meaning one row per customer with a balance. I am hard-coding the aging using the default aging setup installed with GP, which is aging by [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3979&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I have created a variation on <a title="SQL view for all unapplied Receivables transactions in Dynamics GP" href="http://victoriayudin.com/2009/09/05/sql-view-for-all-unapplied-receivables-transactions-in-dynamics-gp/">my view that shows all unapplied Receivables transactions</a> to show customer aging in buckets. This is only looking at functional currency and will return data in summary, meaning one row per customer with a balance. I am hard-coding the aging using the default aging setup installed with GP, which is aging by due date and using the following buckets:</p>
<ul>
<li>
<div style="text-align:justify;">Current</div>
</li>
<li>
<div style="text-align:justify;">31 to 60 Days</div>
</li>
<li>
<div style="text-align:justify;">61 to 90 Days</div>
</li>
<li>
<div style="text-align:justify;">91 and Over</div>
</li>
</ul>
<p style="text-align:justify;">If you would like to use different aging buckets, just follow the examples in my code.</p>
<p style="text-align:justify;">You can find more Receivables code <a title="Receivables SQL Views" href="http://victoriayudin.com/gp-reports/receivables-sql-views/">here</a>, or links to additional reporting resources <a title="GP Reports" href="http://victoriayudin.com/gp-reports/">on my GP Reports page</a>.</p>
<p><pre class="brush: sql;">
create view view_Current_Receivables_Aging_Summary
as

-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
-- view_Current_Receivables_Aging_Summary
-- Created Jan 25, 2012 by Victoria Yudin - Flexible Solutions, Inc.
-- For updates see http://victoriayudin.com/gp-reports/
-- Shows current AR aging with hard-coded aging buckets
-- Tables used:
--     CM - RM00101 - Customer Master
--     CS - RM00103 – Customer Master Summary
--     RM - RM20101 - Open Transactions
-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

SELECT
CM.CUSTNMBR Customer_ID, CM.CUSTNAME Customer_Name,
CM.PYMTRMID Customer_Terms, CM.CUSTCLAS Customer_Class,
CM.PRCLEVEL Price_Level,

sum(CASE
WHEN RM.RMDTYPAL &lt; 7 THEN RM.CURTRXAM
ELSE RM.CURTRXAM * -1
END) Total_Due,

sum(CASE
WHEN DATEDIFF(d, RM.DUEDATE, getdate()) &lt; 31 and RM.RMDTYPAL &lt; 7 THEN RM.CURTRXAM
WHEN DATEDIFF(d, RM.DUEDATE, getdate()) &lt; 31 and RM.RMDTYPAL &gt; 6 THEN RM.CURTRXAM *-1
ELSE 0
END) [Current],

sum(CASE
WHEN DATEDIFF(d, RM.DUEDATE, getdate()) between 31 and 60 and RM.RMDTYPAL &lt; 7 THEN RM.CURTRXAM
WHEN DATEDIFF(d, RM.DUEDATE, getdate()) between 31 and 60 and RM.RMDTYPAL &gt; 6 THEN RM.CURTRXAM * -1
ELSE 0
END) [31_to_60_Days],

sum(CASE
WHEN DATEDIFF(d, RM.DUEDATE, getdate()) between 61 and 90 and RM.RMDTYPAL &lt; 7 THEN RM.CURTRXAM
WHEN DATEDIFF(d, RM.DUEDATE, getdate()) between 61 and 90 and RM.RMDTYPAL &gt; 6 THEN RM.CURTRXAM * -1
ELSE 0
END) [61_to_90_Days],

sum(CASE
WHEN DATEDIFF(d, RM.DUEDATE, getdate()) &gt; 90 and RM.RMDTYPAL &lt; 7 THEN RM.CURTRXAM
WHEN DATEDIFF(d, RM.DUEDATE, getdate()) &gt; 90 and RM.RMDTYPAL &gt; 6 THEN RM.CURTRXAM *-1
ELSE 0
END) [91_and_Over],

CS.LASTPYDT Last_Payment_Date,
CS.LPYMTAMT Last_Payment_Amount

FROM RM20101 RM

INNER JOIN RM00101 CM
     ON RM.CUSTNMBR = CM.CUSTNMBR
INNER JOIN RM00103 CS
     ON RM.CUSTNMBR = CS.CUSTNMBR

WHERE RM.VOIDSTTS = 0 and RM.CURTRXAM &lt;&gt; 0

GROUP BY CM.CUSTNMBR, CM.CUSTNAME, CM.PYMTRMID, CM.CUSTCLAS, CM.PRCLEVEL, CS.LASTPYDT,
CS.LPYMTAMT

-- add permissions for DYNGRP
GO
GRANT SELECT ON view_Current_Receivables_Aging_Summary TO DYNGRP
</pre></p>
<p style="text-align:justify;"><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a>, <a href='http://victoriayudin.com/category/gp-reports-code/receivables-sql-code/'>Receivables SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/gp-sql-view/'>GP SQL view</a>, <a href='http://victoriayudin.com/tag/receivables/'>Receivables</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3979/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3979/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3979/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3979/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3979/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3979/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3979/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3979/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3979/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3979/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3979/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3979/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3979/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3979/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3979&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2012/01/25/sql-view-for-current-receivables-aging-in-dynamics-gp/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2012/01/abacus.jpg?w=69" />
		<media:content url="http://victoriayudin.files.wordpress.com/2012/01/abacus.jpg?w=69" medium="image">
			<media:title type="html">abacus</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for sales quantities by item by year</title>
		<link>http://victoriayudin.com/2012/01/23/sql-view-for-sales-quantities-by-item-by-year-2/</link>
		<comments>http://victoriayudin.com/2012/01/23/sql-view-for-sales-quantities-by-item-by-year-2/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 12:37:59 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[SOP SQL code]]></category>
		<category><![CDATA[Sales Order Processing]]></category>
		<category><![CDATA[SQL code]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3960</guid>
		<description><![CDATA[Even since I published my view for sales by item by year I started receiving requests for the same type of view showing quantities instead of amounts. There are two ways of doing this, once from inventory and another from sales.  Hard to say which is the best, as I have seen arguments for both, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3960&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Even since I published my <a title="SQL view for sales by item by year" href="http://victoriayudin.com/2011/08/11/sql-view-for-sales-by-item-by-year/">view for sales by item by year</a> I started receiving requests for the same type of view showing quantities instead of amounts. There are two ways of doing this, once from inventory and another from sales.  Hard to say which is the best, as I have seen arguments for both, but I prefer to do this from the SOP module. The view below makes a number of assumptions (listed in the view comments in green), and I am hard coding years from 2000 through 2012 as well as adding an overall total column at the end. You can easily change the years or add new ones by following the example in my code.</p>
<p style="text-align:justify;">To see additional Dynamics GP SOP code please take look at <a title="SOP SQL Views" href="http://victoriayudin.com/gp-reports/sop-sql-views/">this page</a>. For additional GP reporting information and links, check out my <a title="GP Reports" href="http://victoriayudin.com/gp-reports/">GP Reports</a> page.</p>
<p><pre class="brush: sql;">

create view view_Sales_Qty_by_Item_by_Year
as

--***********************************************************************************
--view_Sales_Qty_by_Item_by_Year
--Created Jan 23, 2012 by Victoria Yudin - Flexible Solutions, Inc.
--For updates see http://victoriayudin.com/gp-reports/
--Returns total sales quantities fulfilled (invoices - returns) for each item by year
--Only posted invoices and returns are included
--Quantity is calculated by multiplying by QTYBSUOM column in case other UofM's are
--     used on transations
--Voided transations are excluded
--Item Description is taken from Inventory Item Maintenance for all inventory items
--     and from SOP line items for non-inventory items
--***********************************************************************************

SELECT
D.ITEMNMBR Item_Number, D.Item_Description,
sum(case when year(D.DOCDATE) = 2000 then D.Qty else 0 end) as [2000_Qty],
sum(case when year(D.DOCDATE) = 2001 then D.Qty else 0 end) as [2001_Qty],
sum(case when year(D.DOCDATE) = 2002 then D.Qty else 0 end) as [2002_Qty],
sum(case when year(D.DOCDATE) = 2003 then D.Qty else 0 end) as [2003_Qty],
sum(case when year(D.DOCDATE) = 2004 then D.Qty else 0 end) as [2004_Qty],
sum(case when year(D.DOCDATE) = 2005 then D.Qty else 0 end) as [2005_Qty],
sum(case when year(D.DOCDATE) = 2006 then D.Qty else 0 end) as [2006_Qty],
sum(case when year(D.DOCDATE) = 2007 then D.Qty else 0 end) as [2007_Qty],
sum(case when year(D.DOCDATE) = 2008 then D.Qty else 0 end) as [2008_Qty],
sum(case when year(D.DOCDATE) = 2009 then D.Qty else 0 end) as [2009_Qty],
sum(case when year(D.DOCDATE) = 2010 then D.Qty else 0 end) as [2010_Qty],
sum(case when year(D.DOCDATE) = 2011 then D.Qty else 0 end) as [2011_Qty],
sum(case when year(D.DOCDATE) = 2012 then D.Qty else 0 end) as [2012_Qty],
sum(D.Qty) Total_Qty

FROM
(SELECT SH.DOCDATE, SD.ITEMNMBR,
 coalesce(I.ITEMDESC, SD.ITEMDESC) Item_Description,
 CASE SD.SOPTYPE
     WHEN 3 THEN SD.QTYFULFI*QTYBSUOM
     WHEN 4 THEN SD.QUANTITY*QTYBSUOM*-1
     END Qty
 FROM SOP30200 SH
 INNER JOIN
     SOP30300 SD
     ON SD.SOPNUMBE = SH.SOPNUMBE
     AND SD.SOPTYPE = SH.SOPTYPE
 LEFT OUTER JOIN
     IV00101 I
     ON I.ITEMNMBR = SD.ITEMNMBR
 WHERE SH.VOIDSTTS = 0
     AND SH.SOPTYPE IN (3,4)
     AND SD.ITEMNMBR not like 'XXXXXXXXXXXXXXX%') D

GROUP BY D.ITEMNMBR, D.Item_Description

GO
GRANT SELECT ON view_Sales_Qty_by_Item_by_Year TO DYNGRP
</pre></p>
<p style="text-align:justify;"><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a>, <a href='http://victoriayudin.com/category/gp-reports-code/sop-sql-code/'>SOP SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/sales-order-processing/'>Sales Order Processing</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3960/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3960&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2012/01/23/sql-view-for-sales-quantities-by-item-by-year-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2012/01/guywithboxes.jpg?w=96" />
		<media:content url="http://victoriayudin.files.wordpress.com/2012/01/guywithboxes.jpg?w=96" medium="image">
			<media:title type="html">3d boxes</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for customer yearly totals in Dynamics GP</title>
		<link>http://victoriayudin.com/2012/01/09/sql-view-for-customer-yearly-totals-in-dynamics-gp/</link>
		<comments>http://victoriayudin.com/2012/01/09/sql-view-for-customer-yearly-totals-in-dynamics-gp/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 18:31:31 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[Receivables SQL code]]></category>
		<category><![CDATA[GP SQL view]]></category>
		<category><![CDATA[Receivables]]></category>
		<category><![CDATA[SQL code]]></category>
		<category><![CDATA[year end close]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3947</guid>
		<description><![CDATA[As a follow up to my SQL view for vendor yearly totals, here is something similar for customers. I have combined sales less credits/returns in one column, please take a look at the notes above the code (on lines 5 through 16 below) to see more details about the logic I am using. The code [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3947&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">As a follow up to my <a title="SQL view for vendor yearly totals in Dynamics GP" href="http://victoriayudin.com/2012/01/04/sql-view-for-vendor-yearly-totals-in-dynamics-gp/">SQL view for vendor yearly totals</a>, here is something similar for customers.</p>
<p style="text-align:justify;">I have combined sales less credits/returns in one column, please take a look at the notes above the code (on lines 5 through 16 below) to see more details about the logic I am using. The code below will give you 2007 through 2012 calendar years as well as &#8216;life-to-date&#8217; total sales. You can add or remove years as needed following my example.</p>
<p style="text-align:justify;">For more Dynamics GP Receivables code, take a look at my <a title="Receivables SQL Views" href="http://victoriayudin.com/gp-reports/receivables-sql-views/">Receivables SQL Views page</a>. Or check out my <a title="GP Reports" href="http://victoriayudin.com/gp-reports/">GP Reports page</a> for views in other modules and additional report writing and coding tips.</p>
<p><pre class="brush: sql;">
CREATE VIEW view_Customer_Totals_by_Year
AS

-- *********************************************************************
-- Created Jan 9, 2012 by Victoria Yudin - Flexible Solutions, Inc.
-- For updates please check http://victoriayudin.com/gp-reports/
-- Includes all posted receivables transactions in GP
-- Document dates and calendar years are used for groupings
-- Voided transactions are excluded
-- Sales amount adds Invoices, Debit Memos and Finance Charges
--      and subtracts Credit Memos and Returns
-- Amount includes subtotal plus misc amount less trade discount
-- Only fucntional currency is shown
-- Note that Returns are assumed as 'on account', if this is not
--      typically the case, Returns should be excluded
-- Total columns shows all years, not just what is shown in the columns
-- *********************************************************************

SELECT
T.CUSTNMBR [Customer ID], C.CUSTNAME [Customer Name], C.CUSTCLAS [Class ID],
sum(case when YEAR(T.DOCDATE) = 2012 then T.Amount else 0 end) [2012 Sales],
sum(case when YEAR(T.DOCDATE) = 2011 then T.Amount else 0 end) [2011 Sales],
sum(case when YEAR(T.DOCDATE) = 2010 then T.Amount else 0 end) [2010 Sales],
sum(case when YEAR(T.DOCDATE) = 2009 then T.Amount else 0 end) [2009 Sales],
sum(case when YEAR(T.DOCDATE) = 2008 then T.Amount else 0 end) [2008 Sales],
sum(case when YEAR(T.DOCDATE) = 2007 then T.Amount else 0 end) [2007 Sales],
sum(T.Amount) [Total Sales]

FROM -- all posted RM transactions, exclude voids
(SELECT  CUSTNMBR, DOCDATE, GLPOSTDT, DOCNUMBR,
 case when RMDTYPAL in (1,3,4) then (SLSAMNT + MISCAMNT - TRDISAMT)
	  when RMDTYPAL in (7,8) then -1*(SLSAMNT + MISCAMNT - TRDISAMT)
	  else 0 end Amount
 FROM RM20101
 WHERE VOIDSTTS = 0
UNION ALL
 SELECT  CUSTNMBR, DOCDATE, GLPOSTDT, DOCNUMBR,
 case when RMDTYPAL in (1,3,4) then (SLSAMNT + MISCAMNT - TRDISAMT)
	  when RMDTYPAL in (7,8) then -1*(SLSAMNT + MISCAMNT - TRDISAMT)
	  else 0 end Amount
 FROM RM30101
 WHERE VOIDSTTS = 0) T

LEFT OUTER JOIN RM00101 C  -- customer master
     ON T.CUSTNMBR = C.CUSTNMBR

GROUP BY T.CUSTNMBR, C.CUSTNAME, C.CUSTCLAS

GO
GRANT SELECT ON view_Customer_Totals_by_Year TO DYNGRP
</pre></p>
<p><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a>, <a href='http://victoriayudin.com/category/gp-reports-code/receivables-sql-code/'>Receivables SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/gp-sql-view/'>GP SQL view</a>, <a href='http://victoriayudin.com/tag/receivables/'>Receivables</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a>, <a href='http://victoriayudin.com/tag/year-end-close/'>year end close</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3947/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3947/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3947/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3947/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3947/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3947/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3947/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3947/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3947/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3947/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3947/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3947/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3947/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3947/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3947&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2012/01/09/sql-view-for-customer-yearly-totals-in-dynamics-gp/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2012/01/calculator.jpg?w=96" />
		<media:content url="http://victoriayudin.files.wordpress.com/2012/01/calculator.jpg?w=96" medium="image">
			<media:title type="html">calculator</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for vendor yearly totals in Dynamics GP</title>
		<link>http://victoriayudin.com/2012/01/04/sql-view-for-vendor-yearly-totals-in-dynamics-gp/</link>
		<comments>http://victoriayudin.com/2012/01/04/sql-view-for-vendor-yearly-totals-in-dynamics-gp/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 11:10:40 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[Payables SQL code]]></category>
		<category><![CDATA[GP SQL view]]></category>
		<category><![CDATA[Payables]]></category>
		<category><![CDATA[SQL code]]></category>
		<category><![CDATA[year end close]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3931</guid>
		<description><![CDATA[There has been a lot of talk lately about the year end close Payables and Receivables. I feel like I have spent the last week or two justifying my reasoning for not needing to perform the year end close for Payables and Receivables to many of my customers and blog readers. (For more on this, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3931&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">There has been a lot of talk lately about the year end close Payables and Receivables. I feel like I have spent the last week or two justifying my reasoning for not needing to perform the year end close for Payables and Receivables to many of my customers and blog readers. (For more on this, please see my <a title="Year end close in Dynamics GP" href="http://victoriayudin.com/2008/11/14/year-end-close-in-dynamics-gp/" target="_blank">Year end close in Dynamics GP blog post</a>.)</p>
<p style="text-align:justify;">My main reasoning has always been that the only thing accomplished by the year end close is updating the &#8216;amounts since last close&#8217; year-to-date and last-year totals and since that can be easily (and maybe even better?) accomplished by a custom report, why waste time on the year end close for these modules in GP? However, where is this custom report?</p>
<p style="text-align:justify;">For Payables &#8211; you now have 2 choices.  I previously published <a title="SQL view to show yearly totals for Dynamics GP Vendors" href="http://victoriayudin.com/2010/07/15/sql-view-to-show-yearly-totals-for-dynamics-gp-vendors/" target="_blank">this view</a> that results in one row per vendor per year with the columns being the different possible totals GP tracks for vendors. This is often useful for comparing year to year information for one vendor at a time.</p>
<p style="text-align:justify;">However, many people have asked to see this in columns representing years, so they can see all the vendor totals at the same time for all the years. That&#8217;s what you have below. I included separate columns for amounts billed and paid &#8211; please take a look at the notes (in green) for more details on the logic. The code below will give you 2007 through 2012 calendar years as well as &#8216;life-to-date&#8217; totals. You can add or remove years as needed following my example.</p>
<p style="text-align:justify;">I will be posting a similar view for Receivables in the next few days, so keep an eye out. For more Dynamics GP Payables code, take a look at my <a title="Payables SQL Views" href="http://victoriayudin.com/gp-reports/payables-sql-views/">Payables SQL Views page</a>. Or check out my <a title="GP Reports" href="http://victoriayudin.com/gp-reports/">GP Reports page</a> for views in other modules and additional report writing and coding tips.</p>
<p><pre class="brush: sql;">
CREATE VIEW view_Vendor_Totals_by_Year
AS

-- ****************************************************************
-- Created Jan 4, 2012 by Victoria Yudin - Flexible Solutions, Inc.
-- For updates please check http://victoriayudin.com/gp-reports/
-- Includes all posted payables transactions in GP
-- Document dates and calendar years are used for groupings
-- Voided transactions are excluded
-- Billed amount adds Invoices, Finance Charges and Misc Charges
--      and subtracts Credit Memos and Returns
-- Only fucntional currency is shown
-- Note that Returns are assumed as 'on account', if this is not
--      typically the case, Returns should be excluded
-- ****************************************************************

SELECT
P.VENDORID [Vendor ID],
V.VENDNAME [Vendor Name],
sum(case when year(P.DOCDATE) = 2012 and P.DOCTYPE &lt; 6
   then P.DOCAMNT else 0 end) [2012 Billed],
sum(case when year(P.DOCDATE) = 2012 and P.DOCTYPE = 6
   then P.DOCAMNT else 0 end) [2012 Paid],
sum(case when year(P.DOCDATE) = 2011 and P.DOCTYPE &lt; 6
   then P.DOCAMNT else 0 end) [2011 Billed],
sum(case when year(P.DOCDATE) = 2011 and P.DOCTYPE = 6
   then P.DOCAMNT else 0 end) [2011 Paid],
sum(case when year(P.DOCDATE) = 2010 and P.DOCTYPE &lt; 6
   then P.DOCAMNT else 0 end) [2010 Billed],
sum(case when year(P.DOCDATE) = 2010 and P.DOCTYPE = 6
   then P.DOCAMNT else 0 end) [2010 Paid],
sum(case when year(P.DOCDATE) = 2009 and P.DOCTYPE &lt; 6
   then P.DOCAMNT else 0 end) [2009 Billed],
sum(case when year(P.DOCDATE) = 2009 and P.DOCTYPE = 6
   then P.DOCAMNT else 0 end) [2009 Paid],
sum(case when year(P.DOCDATE) = 2008 and P.DOCTYPE &lt; 6
   then P.DOCAMNT else 0 end) [2008 Billed],
sum(case when year(P.DOCDATE) = 2008 and P.DOCTYPE = 6
   then P.DOCAMNT else 0 end) [2008 Paid],
sum(case when year(P.DOCDATE) = 2007 and P.DOCTYPE &lt; 6
   then P.DOCAMNT else 0 end) [2007 Billed],
sum(case when year(P.DOCDATE) = 2007 and P.DOCTYPE = 6
   then P.DOCAMNT else 0 end) [2007 Paid],
sum(case when P.DOCTYPE &lt; 6 then P.DOCAMNT else 0 end) [Life Billed],
sum(case when P.DOCTYPE = 6 then P.DOCAMNT else 0 end) [Life Paid]

FROM --all posted payables transactions, exclude voids
 (SELECT VENDORID, DOCTYPE, DOCDATE, PSTGDATE,
 case when DOCTYPE in (4,5) then DOCAMNT *-1 else DOCAMNT end DOCAMNT
 FROM PM20000
 WHERE VOIDED = 0
 UNION ALL
 SELECT VENDORID, DOCTYPE, DOCDATE, PSTGDATE,
 case when DOCTYPE in (4,5) then DOCAMNT *-1 else DOCAMNT end DOCAMNT
 FROM PM30200
 WHERE VOIDED = 0) P

INNER JOIN -- vendor master
 PM00200 V
 ON V.VENDORID = P.VENDORID

GROUP BY P.VENDORID, V.VENDNAME

GO
GRANT SELECT ON view_Vendor_Totals_by_Year TO DYNGRP
</pre></p>
<p><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a>, <a href='http://victoriayudin.com/category/gp-reports-code/payables-sql-code/'>Payables SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/gp-sql-view/'>GP SQL view</a>, <a href='http://victoriayudin.com/tag/payables/'>Payables</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a>, <a href='http://victoriayudin.com/tag/year-end-close/'>year end close</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3931/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3931/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3931/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3931/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3931/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3931/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3931/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3931/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3931/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3931/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3931/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3931/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3931/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3931/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3931&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2012/01/04/sql-view-for-vendor-yearly-totals-in-dynamics-gp/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/02/briefcaseinvoice.jpg?w=85" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/02/briefcaseinvoice.jpg?w=85" medium="image">
			<media:title type="html">briefcase invoice</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>Happy New Year &#8211; 2012</title>
		<link>http://victoriayudin.com/2012/01/02/happy-new-year-2012/</link>
		<comments>http://victoriayudin.com/2012/01/02/happy-new-year-2012/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 18:12:34 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[awards]]></category>
		<category><![CDATA[Microsoft MVP]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3924</guid>
		<description><![CDATA[I found out yesterday that I have been awarded the Microsoft Most Valuable Professional Award for Dynamics GP for another year. This makes the 8th year in a row for me. I am very honored to get this award again and would like to thank everyone that reads my blog &#8211; this would not be possible without you! [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3924&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I found out yesterday that I have been awarded the Microsoft Most Valuable Professional Award for Dynamics GP for another year. This makes the 8th year in a row for me. I am very honored to get this award again and would like to thank everyone that reads my blog &#8211; this would not be possible without you!</p>
<p style="text-align:justify;">For those curious, the <a title="About the Microsoft MVP program" href="https://mvp.support.microsoft.com/gp/aboutmvp" target="_blank">Microsoft MVP program</a> has been in place since the early 1990&#8242;s and currently recognizes about 4,000 active MVPs worldwide. You can <a title="search for Microsoft MVPs by product" href="https://mvp.support.microsoft.com/communities/mvp.aspx" target="_blank">search for MVPs by product</a> or take a look at the list of <a title="current Dynamics GP MVPs" href="https://mvp.support.microsoft.com/communities/mvp.aspx?product=1&amp;competency=Dynamics+GP" target="_blank">current Dynamics GP MVPs</a>.</p>
<p style="text-align:justify;">Happy, healthy and prosperous 2012!</p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/microsoft/'>Microsoft</a> Tagged: <a href='http://victoriayudin.com/tag/awards/'>awards</a>, <a href='http://victoriayudin.com/tag/microsoft-mvp/'>Microsoft MVP</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3924/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3924&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2012/01/02/happy-new-year-2012/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2012/01/mvp-logo1.jpg?w=128" />
		<media:content url="http://victoriayudin.files.wordpress.com/2012/01/mvp-logo1.jpg?w=128" medium="image">
			<media:title type="html">MVP Logo</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view to show monthly totals for Dynamics GP Vendors</title>
		<link>http://victoriayudin.com/2011/12/09/sql-view-to-show-monthly-totals-for-dynamics-gp-vendors/</link>
		<comments>http://victoriayudin.com/2011/12/09/sql-view-to-show-monthly-totals-for-dynamics-gp-vendors/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 11:35:17 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[Payables SQL code]]></category>
		<category><![CDATA[GP SQL view]]></category>
		<category><![CDATA[Payables]]></category>
		<category><![CDATA[SQL code]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3902</guid>
		<description><![CDATA[In response to a reader request, I have created this new view based on my Vendor Yearly Totals view that will show monthly totals for your Dynamics GP Vendors for all years. This view will show both the numbers and names of the months and assumes that you have 12 periods corresponding to the calendar [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3902&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">In response to a reader request, I have created this new view based on my <a title="SQL view to show yearly totals for Dynamics GP Vendors" href="http://victoriayudin.com/2010/07/15/sql-view-to-show-yearly-totals-for-dynamics-gp-vendors/">Vendor Yearly Totals view</a> that will show monthly totals for your Dynamics GP Vendors for all years.</p>
<p style="text-align:justify;">This view will show both the numbers and names of the months and assumes that you have 12 periods corresponding to the calendar months. To get results for a particular year you can run the following query against this view after creating it:</p>
<p><code> select * from view_Vendor_Monthly_Totals<br />
where [Year] = 2011 <span style="color:#008000;">--change the year as desired</span><br />
</code></p>
<p>For more Dynamics GP Payables code, take a look at my <a title="Payables SQL Views" href="http://victoriayudin.com/gp-reports/payables-sql-views/">Payables SQL Views page</a>. Or check out my <a title="GP Reports" href="http://victoriayudin.com/gp-reports/">GP Reports page</a> for views in other modules and additional report writing and coding tips.</p>
<p><pre class="brush: sql;">

CREATE VIEW view_Vendor_Monthly_Totals
AS

-- ***************************************************************
-- view_Vendor_Monthly_Totals
-- Created Dec 9, 2011 by Victoria Yudin - Flexible Solutions, Inc.
-- For updates please see http://victoriayudin.com/gp-reports/
-- Shows totals for all AP vendors per month and year
-- Assumes periods are calendar months
-- Results shown for calendar months and functionaly currency
-- ***************************************************************

SELECT VT.VENDORID Vendor_ID,
       VM.VENDNAME Vendor_Name,
       VM.VNDCLSID Class_ID,
       case VM.VENDSTTS
          when 1 then 'Active'
          when 2 then 'Inactive'
          when 3 then 'Temporary'
          end Vendor_Status,
       case VM.TEN99TYPE
          when 1 then 'Not a 1099 Vendor'
          when 2 then 'Dividend'
          when 3 then 'Interest'
          when 4 then 'Miscellaneous'
          end [1099_Type],
       VM.PYMTRMID Payment_Terms_ID,
       VT.PERIODID Period,
       datename(month, DATEADD(month, VT.PERIODID, -1 )) [Month],
       VT.YEAR1 [Year],
       sum(VT.AMBLDLIF) Amount_Billed,
       sum(VT.AMTPDLIF) Amount_Paid,
       sum(VT.TEN99ALIF) [1099_Amount],
       sum(VT.FINCHLIF) Finance_Charges,
       sum(VT.WROFSLIF) Writeoffs,
       sum(VT.RTRNSLIF) [Returns],
       sum(VT.TRDTKLIF) Trade_Discounts,
       sum(VT.DISAVLIF) Term_Discounts_Avail,
       sum(VT.DISTKNLF) Term_Discounts_Taken,
       sum(VT.DISLSTLF) Term_Discounts_Lost,
       sum(VT.Withholding_LIFE) Withholding,
       sum(VT.NOINVLIF) Num_Of_Invoices,
       sum(VT.NFNCHLIF) Num_Of_Finance_Charges,
       VM.ADDRESS1 Address_1,
       VM.ADDRESS2 Address_2,
       VM.ADDRESS3 Address_3,
       VM.CITY City,
       VM.[STATE] [State],
       VM.ZIPCODE Zip_Code,
       VM.COUNTRY Country,
       VM.TXIDNMBR Tax_ID

FROM PM00202 VT

INNER JOIN PM00200 VM
       ON VT.VENDORID = VM.VENDORID

WHERE VT.HISTTYPE = 0

GROUP BY VT.VENDORID, VM.VENDNAME, VM.VNDCLSID, VM.VENDSTTS, VM.TEN99TYPE,
		 VM.PYMTRMID, VT.PERIODID, VT.YEAR1, VM.ADDRESS1, VM.ADDRESS2,
         VM.ADDRESS3, VM.CITY, VM.[STATE], VM.ZIPCODE, VM.COUNTRY, VM.TXIDNMBR

GO
GRANT SELECT ON view_Vendor_Monthly_Totals TO DYNGRP
</pre></p>
<p style="text-align:justify;"><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a>, <a href='http://victoriayudin.com/category/gp-reports-code/payables-sql-code/'>Payables SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/gp-sql-view/'>GP SQL view</a>, <a href='http://victoriayudin.com/tag/payables/'>Payables</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3902/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3902/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3902/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3902/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3902/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3902/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3902/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3902/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3902/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3902/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3902/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3902/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3902/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3902/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3902&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/12/09/sql-view-to-show-monthly-totals-for-dynamics-gp-vendors/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/12/shaking-hands.jpg?w=110" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/12/shaking-hands.jpg?w=110" medium="image">
			<media:title type="html">shaking hands</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>Decisions Fall 2011 &#8211; GP Day is today</title>
		<link>http://victoriayudin.com/2011/12/06/decisions-fall-2011-gp-day-is-today/</link>
		<comments>http://victoriayudin.com/2011/12/06/decisions-fall-2011-gp-day-is-today/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 13:21:15 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[MSDynamicsWorld]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3886</guid>
		<description><![CDATA[Come talk to us about new features in GP Reports Viewer at MSDynamicsWorld&#8217;s Decisions Fall 2011 today. I will be there all day along with our senior developer and SRS expert Mickie Stamm. Filed under: Dynamics GP, Events Tagged: Dynamics GP, MSDynamicsWorld<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3886&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Come talk to us about <a title="new features in GP Reports Viewer" href="http://GPReportsViewer.com/newsletters/201111.html" target="_blank">new features in GP Reports Viewer</a> at MSDynamicsWorld&#8217;s <a title="MSDynamicsWorld's Decisions Fall 2011 " href="http://decisions.msdynamicsworld.com/" target="_blank">Decisions Fall 2011</a> today. I will be there all day along with our senior developer and SRS expert Mickie Stamm.</p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/events/'>Events</a> Tagged: <a href='http://victoriayudin.com/tag/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/tag/msdynamicsworld/'>MSDynamicsWorld</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3886/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3886/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3886/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3886/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3886/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3886/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3886/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3886/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3886/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3886/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3886/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3886/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3886/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3886/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3886&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/12/06/decisions-fall-2011-gp-day-is-today/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/12/fall_decisions_02.jpg?w=104" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/12/fall_decisions_02.jpg?w=104" medium="image">
			<media:title type="html">fall_decisions_02</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>Protect your investment in Microsoft Dynamics GP</title>
		<link>http://victoriayudin.com/2011/11/07/protect-your-investment-in-microsoft-dynamics-gp/</link>
		<comments>http://victoriayudin.com/2011/11/07/protect-your-investment-in-microsoft-dynamics-gp/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 20:02:43 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[articles]]></category>
		<category><![CDATA[MSDynamicsWorld]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3871</guid>
		<description><![CDATA[MSDynamicsWorld.com has just published my new article called Protect Your Investment: Five Things You Must Document in a Microsoft Dynamics GP Solution. For more of my articles on MSDynamicsWorld, take a look at my profile page. And while you&#8217;re there, don&#8217;t forget to register for Decisions Fall 2011. Filed under: Dynamics GP Tagged: articles, Dynamics GP, MSDynamicsWorld<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3871&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a title="MSDynamicsWorld.com" href="http://www.msdynamicsworld.com/" target="_blank">MSDynamicsWorld.com</a> has just published my new article called <a title="Protect Your Investment: Five Things You Must Document in a Microsoft Dynamics GP Solution" href="http://msdynamicsworld.com/story/protect-your-investment-five-things-you-must-document-microsoft-dynamics-gp-solution" target="_blank">Protect Your Investment: Five Things You Must Document in a Microsoft Dynamics GP Solution</a>. For more of my articles on MSDynamicsWorld, take a look at my <a title="Victoria Yudin articles on MSDynamicsWorld" href="http://msdynamicsworld.com/author/victoria-yudin" target="_blank">profile page</a>. And while you&#8217;re there, don&#8217;t forget to register for <a title="Decisions Fall 2011" href="http://decisions.msdynamicsworld.com/" target="_blank">Decisions Fall 2011</a>.</p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a> Tagged: <a href='http://victoriayudin.com/tag/articles/'>articles</a>, <a href='http://victoriayudin.com/tag/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/tag/msdynamicsworld/'>MSDynamicsWorld</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3871/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3871/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3871/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3871/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3871/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3871/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3871/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3871/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3871/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3871/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3871/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3871/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3871/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3871/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3871&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/11/07/protect-your-investment-in-microsoft-dynamics-gp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/11/orange-pen.jpg?w=57" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/11/orange-pen.jpg?w=57" medium="image">
			<media:title type="html">orange pen</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for SOP email setup in GP 2010</title>
		<link>http://victoriayudin.com/2011/10/24/sql-view-for-sop-email-setup-in-gp-2010/</link>
		<comments>http://victoriayudin.com/2011/10/24/sql-view-for-sop-email-setup-in-gp-2010/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 11:46:02 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP 2010]]></category>
		<category><![CDATA[GP Reports Viewer]]></category>
		<category><![CDATA[System/Setup SQL code]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[SQL code]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3845</guid>
		<description><![CDATA[I am starting to work with emailing SOP documents using Dynamics GP 2010 and new functionality that we are going to be releasing in an upcoming build of GP Reports Viewer. It&#8217;s pretty cool stuff, however, as I am working with customers to set this up, we&#8217;re finding that out-of-the box GP does not have any [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3845&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I am starting to work with emailing SOP documents using Dynamics GP 2010 and new functionality that we are going to be releasing in an upcoming build of <a title="GP Reports Viewer" href="http://www.GPReportsViewer.com/gpreports.html" target="_blank">GP Reports Viewer</a>. It&#8217;s pretty cool stuff, however, as I am working with customers to set this up, we&#8217;re finding that out-of-the box GP does not have any easy way to check all of the email setup.</p>
<p style="text-align:justify;">To help with this, I have added the email tables to my <a title="Company/System Tables" href="http://victoriayudin.com/gp-tables/companysystem-tables/" target="_blank">Company/System Tables page</a> and have created the view below that lists all customers, the email addresses for their default Bill To Address and what has been set up for emailing SOP documents for each of them.</p>
<p><pre class="brush: sql;">
create view view_Customer_SOP_Email_Setup
as

--****************************************************************
-- created 10/20/2011 by Victoria Yudin - Flexible Solutions, Inc. 
-- for updates please see http://victoriayudin.com/gp-reports/ 
-- only shows email addresses for the default bill to address
-- ***************************************************************

select
CM.CUSTNMBR Customer_ID,
CM.CUSTNAME Customer_Name,
CM.PRBTADCD Default_Bill_To_Address_ID,
coalesce(II.EmailToAddress,'') Email_To,
coalesce(II.EmailCcAddress,'') Email_Cc,
coalesce(II.EmailBccAddress,'') Email_Bcc,
case E1.EmailDocumentEnabled
	when 1 then case E1.EmailDocumentFormat
		when 1 then 'DOCX'
		when 2 then 'HTML'
		when 3 then 'PDF'
		when 4 then 'XPS'
		else ''
		end
	else 'Not enabled'
	end Email_SOP_Quote,
case E2.EmailDocumentEnabled
	when 1 then case E2.EmailDocumentFormat
		when 1 then 'DOCX'
		when 2 then 'HTML'
		when 3 then 'PDF'
		when 4 then 'XPS'
		else ''
		end
	else 'Not enabled'
	end Email_SOP_Order,
case E3.EmailDocumentEnabled
	when 1 then case E3.EmailDocumentFormat
		when 1 then 'DOCX'
		when 2 then 'HTML'
		when 3 then 'PDF'
		when 4 then 'XPS'
		else ''
		end
	else 'Not enabled'
	end Email_SOP_Invoice,
case E4.EmailDocumentEnabled
	when 1 then case E4.EmailDocumentFormat
		when 1 then 'DOCX'
		when 2 then 'HTML'
		when 3 then 'PDF'
		when 4 then 'XPS'
		else ''
		end
	else 'Not enabled'
	end Email_SOP_Return,
case E6.EmailDocumentEnabled
	when 1 then case E6.EmailDocumentFormat
		when 1 then 'DOCX'
		when 2 then 'HTML'
		when 3 then 'PDF'
		when 4 then 'XPS'
		else ''
		end
	else 'Not enabled'
	end Email_SOP_Fulfillment_Order

FROM RM00101 CM  --customer master 
LEFT OUTER JOIN RM00102 CA  --customer addresses
ON CM.CUSTNMBR = CA.CUSTNMBR and CM.PRBTADCD = CA.ADRSCODE

LEFT OUTER JOIN SY01200 II  --internet information
ON CM.CUSTNMBR = II.Master_ID and II.Master_Type = 'CUS'
     and CM.PRBTADCD = II.ADRSCODE

LEFT OUTER JOIN SY04905 E1  --email setup for SOP Quote 
ON CM.CUSTNMBR = E1.EmailCardID AND E1.MODULE1 = 11
     AND E1.EmailDocumentID = 1

LEFT OUTER JOIN SY04905 E2  --email setup for SOP Order 
ON CM.CUSTNMBR = E2.EmailCardID AND E2.MODULE1 = 11
     AND E2.EmailDocumentID = 2

LEFT OUTER JOIN SY04905 E3  --email setup for SOP Invoice
ON CM.CUSTNMBR = E3.EmailCardID AND E3.MODULE1 = 11
     AND E3.EmailDocumentID = 3

LEFT OUTER JOIN SY04905 E4  --email setup for SOP Return
ON CM.CUSTNMBR = E4.EmailCardID AND E4.MODULE1 = 11
     AND E4.EmailDocumentID = 4

LEFT OUTER JOIN SY04905 E6  --email setup for SOP Fulfillment Order 
ON CM.CUSTNMBR = E6.EmailCardID AND E6.MODULE1 = 11
     AND E6.EmailDocumentID = 6

GO
GRANT SELECT ON view_Customer_SOP_Email_Setup TO DYNGRP
</pre></p>
<p style="text-align:justify;"><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-2010/'>GP 2010</a>, <a href='http://victoriayudin.com/category/gp-reports-viewer/'>GP Reports Viewer</a>, <a href='http://victoriayudin.com/category/gp-reports-code/systemsetup-sql-code/'>System/Setup SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/gp-reports-viewer/'>GP Reports Viewer</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3845/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3845/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3845/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3845&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/10/24/sql-view-for-sop-email-setup-in-gp-2010/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/10/email-red.jpg?w=63" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/10/email-red.jpg?w=63" medium="image">
			<media:title type="html">3d small people - email</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>Holiday status poll</title>
		<link>http://victoriayudin.com/2011/10/07/holiday-status-poll/</link>
		<comments>http://victoriayudin.com/2011/10/07/holiday-status-poll/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 16:52:09 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3823</guid>
		<description><![CDATA[The holidays are coming up, so I thought I would start a little poll to see what&#8217;s happening this year&#8230;be truthful! Filed under: Miscellaneous Tagged: Miscellaneous<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3823&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The holidays are coming up, so I thought I would start a little poll to see what&#8217;s happening this year&#8230;be truthful!</p>
<p style="text-align:center;"><a name="pd_a_5565309"></a><div class="PDS_Poll" id="PDI_container5565309" style="display:inline-block;"></div><div id="PD_superContainer"></div><noscript><a href="http://polldaddy.com/poll/5565309">Take Our Poll</a></noscript></p>
<br />Filed under: <a href='http://victoriayudin.com/category/miscellaneous/'>Miscellaneous</a> Tagged: <a href='http://victoriayudin.com/tag/miscellaneous/'>Miscellaneous</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3823/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3823/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3823/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3823/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3823/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3823/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3823/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3823&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/10/07/holiday-status-poll/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/10/santa.jpg?w=96" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/10/santa.jpg?w=96" medium="image">
			<media:title type="html">run santa</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for bank deposits and receipts in Dynamics GP</title>
		<link>http://victoriayudin.com/2011/10/06/sql-view-for-bank-deposits-and-receipts-in-dynamics-gp/</link>
		<comments>http://victoriayudin.com/2011/10/06/sql-view-for-bank-deposits-and-receipts-in-dynamics-gp/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 20:03:30 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Bank Rec SQL code]]></category>
		<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[Bank Reconciliation]]></category>
		<category><![CDATA[GP SQL view]]></category>
		<category><![CDATA[SQL code]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3813</guid>
		<description><![CDATA[About a year ago I published a view for a Checkbook Register and have received some follow up requests asking for a way to show the receipt details. Primarily this request seems to come from the need to see the difference in dates between the receipts and the deposits for tracking down possible bank reconciliation issues. I didn&#8217;t want to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3813&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">About a year ago I published a view for a <a title="SQL view for Dynamics GP Checkbook Register" href="http://victoriayudin.com/2010/10/14/sql-view-for-dynamics-gp-checkbook-register/" target="_blank">Checkbook Register</a> and have received some follow up requests asking for a way to show the receipt details. Primarily this request seems to come from the need to see the difference in dates between the receipts and the deposits for tracking down possible bank reconciliation issues. I didn&#8217;t want to clutter up the original view with this, so I thought it would be better to create a separate view showing the receipt details.</p>
<p style="text-align:justify;">The view below shows all the posted deposits and the associated receipts.  Each receipt is on a separate line and the deposit information will be repeated as many times as there are receipts in that deposit.</p>
<p style="text-align:center;"><span style="color:#888888;">~~~~~</span></p>
<pre>CREATE VIEW view_Bank_Deposits_and_Receipts
as</pre>
<p><span style="color:#888888;"><code>/*******************************************************************</code></span><br />
<span style="color:#888888;"><code>view_Bank_Deposits_and_Receipts</code></span><br />
<span style="color:#888888;"><code>Created on Oct 6, 2011 by Victoria Yudin</code></span><br />
<span style="color:#888888;"><code>For updates please see http://victoriayudin.com/gp-reports/</code></span><br />
<span style="color:#888888;"><code>All bank rec deposits with their receipts - one line per receipt</code></span><br />
<span style="color:#888888;"><code>Includes voided transactions </code></span><br />
<span style="color:#888888;"><code>Tables: </code></span><br />
<span style="color:#888888;"><code>CM20200 - bank transactions </code></span><br />
<span style="color:#888888;"><code>CM20300 - bank receipts </code></span><br />
<span style="color:#888888;"><code>CM40101 - transaction type setup</code></span><br />
<span style="color:#888888;"><code>*******************************************************************/</code></span></p>
<pre>SELECT
     T.CHEKBKID Checkbook_ID,
     T.CMTrxNum Deposit_Number,
     T.TRXDATE Deposit_Date,
     T.GLPOSTDT Deposit_GL_Posting_Date,
     T.Checkbook_Amount Deposit_Amount,
     T.CURNCYID Currency_ID,
     T.DSCRIPTN 'Description',
     T.ClrdAmt Cleared_Amount,
     CASE T.Recond
     WHEN 1 THEN 'Yes'
       ELSE 'No'
       END Reconciled,
     T.AUDITTRAIL Audit_Trail,
     CASE T.VOIDED
       WHEN 1 THEN 'Yes'
       ELSE 'No'
       END Deposit_Voided,
     R.RCPTNMBR Receipt_Number,
     R.receiptdate Receipt_Date,
     R.GLPOSTDT Receipt_GL_Posting_Date,
     CASE R.RcpType
       WHEN 1 THEN 'Check'
       WHEN 2 THEN 'Cash'
       WHEN 3 THEN 'Credit Card'
       END Receipt_Type,
     R.RcvdFrom Received_From,
     R.ORIGAMT Originating_Amount,
     R.Checkbook_Amount Receipt_Amount,
     R.CURNCYID Receipt_Currency,
     CASE R.VOIDED
       WHEN 1 THEN 'Yes'
       ELSE 'No'
       END Receipt_Voided

FROM CM20200 T

LEFT OUTER JOIN CM40101 D
ON D.CMTrxType = T.CMTrxType

LEFT OUTER JOIN CM20300 R
ON R.depositnumber = T.CMTrxNum

WHERE D.DOCABREV = 'DEP'</pre>
<p><code></code><br />
<span style="color:#339966;"><code>/** the following will grant permissions to this view to DYNGRP,</code></span><br />
<code><span style="color:#339966;">leave this section off if you do not want to grant permissions **/</span></code><code><br />
</code><code>GO</code><br />
<code>GRANT SELECT ON view_Bank_Deposits_and_Receipts TO DYNGRP</code></p>
<p style="text-align:center;"><span style="color:#888888;">~~~~~</span></p>
<p style="text-align:justify;"><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/gp-reports-code/bank-rec-sql-code/'>Bank Rec SQL code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a> Tagged: <a href='http://victoriayudin.com/tag/bank-reconciliation/'>Bank Reconciliation</a>, <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/gp-sql-view/'>GP SQL view</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3813/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3813/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3813/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3813/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3813/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3813/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3813/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3813&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/10/06/sql-view-for-bank-deposits-and-receipts-in-dynamics-gp/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2008/10/piggybank.jpg?w=96" />
		<media:content url="http://victoriayudin.files.wordpress.com/2008/10/piggybank.jpg?w=96" medium="image">
			<media:title type="html">piggy bank</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for current Payables aging in Dynamics GP</title>
		<link>http://victoriayudin.com/2011/09/30/sql-view-for-current-payables-aging-in-dynamics-gp/</link>
		<comments>http://victoriayudin.com/2011/09/30/sql-view-for-current-payables-aging-in-dynamics-gp/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 12:51:22 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[Payables SQL code]]></category>
		<category><![CDATA[GP SQL view]]></category>
		<category><![CDATA[Payables]]></category>
		<category><![CDATA[SQL code]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3790</guid>
		<description><![CDATA[Over the past few years I have had several requests for a summary current Payables aging report that can be easily exported into Excel. Yes, you can play with the Report Writer aging report to take out the headers and make it export to Excel, but sometimes there are other reasons for wanting a report outside [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3790&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Over the past few years I have had several requests for a summary current Payables aging report that can be easily exported into Excel. Yes, you can play with the Report Writer aging report to take out the headers and make it export to Excel, but sometimes there are other reasons for wanting a report outside of Report Writer.</p>
<p style="text-align:justify;">Below is a script to create a view for this. It is only looking at functional currency and will return one row per vendor with a balance. I am hard-coding the aging using the default aging setup installed with GP, which is aging by due date and using the following buckets:</p>
<ul>
<li>
<div style="text-align:justify;">Current</div>
</li>
<li>
<div style="text-align:justify;">31 to 60 Days</div>
</li>
<li>
<div style="text-align:justify;">61 to 90 Days</div>
</li>
<li>
<div style="text-align:justify;">91 and Over</div>
</li>
</ul>
<p style="text-align:justify;">If you would like to use different aging buckets, just follow the examples in my code.</p>
<p><pre class="brush: sql;">
create view view_Current_Payables_Aging_Summary
as

-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
-- view_Current_Payables_Aging_Summary
-- Created Sep 30, 2011 by Victoria Yudin - Flexible Solutions, Inc.
-- For updates please see http://victoriayudin.com/gp-reports/
-- Shows current AP aging
-- Functional currency only
-- Updated on Jan 25, 2012 to fix all aging buckets to use due dates
-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

SELECT
VM.VENDORID Vendor_ID, VM.VENDNAME Vendor_Name, 
VM.VNDCLSID Vendor_Class, VM.PYMTRMID Vendor_Terms,

sum(CASE
   WHEN P.DOCTYPE &lt; 4 THEN P.CURTRXAM
   ELSE P.CURTRXAM * -1
   END) Unapplied_Amount,

sum(CASE
   WHEN DATEDIFF(d, P.DUEDATE, getdate()) &lt; 31 and P.DOCTYPE &lt; 4 THEN P.CURTRXAM
   WHEN DATEDIFF(d, P.DUEDATE, getdate()) &lt; 31 and P.DOCTYPE &gt; 3 THEN P.CURTRXAM * -1
   ELSE 0
   END) [Current],

sum(CASE
   WHEN DATEDIFF(d, P.DUEDATE, getdate()) between 31 and 60 
      and P.DOCTYPE &lt; 4 THEN P.CURTRXAM
   WHEN DATEDIFF(d, P.DUEDATE, getdate()) between 31 and 60 
      and P.DOCTYPE &gt; 3 THEN P.CURTRXAM * -1
   ELSE 0
   END) [31_to_60_Days],

sum(CASE
   WHEN DATEDIFF(d, P.DUEDATE, getdate()) between 61 and 90
      and P.DOCTYPE &lt; 4 THEN P.CURTRXAM
   WHEN DATEDIFF(d, P.DUEDATE, getdate()) between 61 and 90
      and P.DOCTYPE &gt; 3 THEN P.CURTRXAM * -1
   ELSE 0
   END) [61_to_90_Days],

sum(CASE
   WHEN DATEDIFF(d, P.DUEDATE, getdate()) &gt; 90 and P.DOCTYPE &lt; 4 THEN P.CURTRXAM
   WHEN DATEDIFF(d, P.DUEDATE, getdate()) &gt; 90 and P.DOCTYPE &gt; 3 THEN P.CURTRXAM * -1
   ELSE 0
   END) [91_and_Over]

FROM PM00200 VM  --vendor master
INNER JOIN PM20000 P  --open payables
   ON P.VENDORID = VM.VENDORID

WHERE P.CURTRXAM &lt;&gt; 0 AND VOIDED = 0

GROUP BY VM.VENDORID, VM.VENDNAME, VM.PYMTRMID, VM.VNDCLSID

-- add permissions for DYNGRP
GO
GRANT SELECT ON view_Current_Payables_Aging_Summary TO DYNGRP
</pre></p>
<p>style=&#8221;text-align: justify;&#8221;&gt;<em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a>, <a href='http://victoriayudin.com/category/gp-reports-code/payables-sql-code/'>Payables SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/gp-sql-view/'>GP SQL view</a>, <a href='http://victoriayudin.com/tag/payables/'>Payables</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3790/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3790&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/09/30/sql-view-for-current-payables-aging-in-dynamics-gp/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/02/briefcaseinvoice.jpg?w=85" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/02/briefcaseinvoice.jpg?w=85" medium="image">
			<media:title type="html">briefcase invoice</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for user activity in Dynamics GP</title>
		<link>http://victoriayudin.com/2011/09/12/sql-view-for-user-activity-in-dynamics-gp/</link>
		<comments>http://victoriayudin.com/2011/09/12/sql-view-for-user-activity-in-dynamics-gp/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 14:13:22 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[System/Setup SQL code]]></category>
		<category><![CDATA[SQL code]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3773</guid>
		<description><![CDATA[There are many different pieces of code that I have seen for this over the years, but more often than not what our users ask me for is a way to quickly see who is logged into GP, what company, and when did they log in. While this can easily be seen on the User Activity window (GP &#124; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3773&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><span style="color:#888888;"><span style="color:#000000;">There are many different pieces of code that I have seen for this over the years, but more often than not what our users ask me for is a way to quickly see who is logged into GP, what company, and when did they log in. While this can easily be seen on the User Activity window (<em>GP | Tools | Utilities | System | User Activity</em>), many users do not have access to this window and sometimes this need arises when someone is either not able to get into GP or does not want to take the time to do so. </span></span></p>
<p style="text-align:justify;"><span style="color:#888888;"><span style="color:#000000;">Below is a view to show all the users logged in and a count of the batches, resources and tables each user has locked or open. Please note that this code will not show details of what the users have locked or open, just the counts. The idea behind this is that if a user has something locked, you may not want to simply delete them out of the ACTIVITY table, because those resources, tables or batches will still be locked by the user. This code can also be helpful to monitor users who are not logging out of the system at night or have multiple companies open.</span></span></p>
<p style="text-align:center;"><span style="color:#888888;">~~~~~</span></p>
<p><code>CREATE VIEW view_User_Activity<br />
AS</code><br />
<span style="color:#339966;"><code>/*</code></span><br />
<span style="color:#339966;"><code>view_User_Activity<br />
created Sep 12, 2011 by Victoria Yudin<br />
for updates please see http://victoriayudin.com/gp-reports/</code></span><br />
<span style="color:#339966;"><code>*/</code></span></p>
<pre>SELECT
a.USERID GP_User_ID,
um.USERNAME [User_Name],
a.CMPNYNAM Company_Name,
a.LOGINDAT+a.LOGINTIM Login_Date_and_Time,
coalesce(b.batch_count,0) Batch_Activity_Records,
coalesce(r.resource_count,0) Resource_Activity_Records,
coalesce(t.table_locks,0) Table_Lock_Records

FROM DYNAMICS..ACTIVITY a

LEFT OUTER JOIN
(SELECT USERID, count(*) batch_count
 FROM DYNAMICS..SY00800
 GROUP BY USERID) b -- batch activity
ON a.USERID = b.USERID

LEFT OUTER JOIN
(SELECT USERID, count(*) resource_count
 FROM DYNAMICS..SY00801
 GROUP BY USERID) r -- resource activity
ON a.USERID = r.USERID

LEFT OUTER JOIN
(SELECT Session_ID, COUNT(*) table_locks
 FROM tempdb..DEX_LOCK
 GROUP BY Session_ID) t -- table locks
ON a.SQLSESID = t.Session_ID

LEFT OUTER JOIN
DYNAMICS..SY01400 um -- user master
ON a.USERID = um.USERID</pre>
<p><code></code><br />
<span style="color:#339966;"><code>/** the following will grant permissions to this view to DYNGRP,<br />
leave this section off if you do not want to grant permissions **/ </code></span><br />
<code>GO<br />
GRANT SELECT ON view_User_Activity TO DYNGRP</code></p>
<p style="text-align:center;"><span style="color:#888888;">~~~~~</span></p>
<p style="text-align:justify;"><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a>, <a href='http://victoriayudin.com/category/gp-reports-code/systemsetup-sql-code/'>System/Setup SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3773/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3773&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/09/12/sql-view-for-user-activity-in-dynamics-gp/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/09/rocking-horse.jpg?w=96" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/09/rocking-horse.jpg?w=96" medium="image">
			<media:title type="html">baby and horse</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for sales by item by month</title>
		<link>http://victoriayudin.com/2011/08/29/sql-view-for-sales-by-item-by-month/</link>
		<comments>http://victoriayudin.com/2011/08/29/sql-view-for-sales-by-item-by-month/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 13:57:35 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[SOP SQL code]]></category>
		<category><![CDATA[Sales Order Processing]]></category>
		<category><![CDATA[SQL code]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3760</guid>
		<description><![CDATA[Here is a new Dynamics GP SQL view in reponsse to a reader that liked my view for sales by item by year, but wanted to see the same thing by month. I am making a few assumptions (listed in the view comments), and am hard coding one year at a time (2011 in this example). You can easily [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3760&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Here is a new Dynamics GP SQL view in reponsse to a reader that liked my view for <a title="SQL view for sales by item by year" href="http://victoriayudin.com/2011/08/11/sql-view-for-sales-by-item-by-year/" target="_blank">sales by item by year</a>, but wanted to see the same thing by month. I am making a few assumptions (listed in the view comments), and am hard coding one year at a time (2011 in this example). You can easily change the year as needed for one year at a time.</p>
<p><pre class="brush: sql;">
&lt;code&gt;create view view_Sales_by_Item_by_Month
as

-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
-- view_Sales_by_Item_by_Month
-- Created Aug 29, 2011 by Victoria Yudin - Flexible Solutions, Inc.
-- For updates see http://victoriayudin.com/gp-reports/
-- Returns total sales (invoices - returns) for each item by month 
--     (for the specified year)
-- Only posted invoices and returns are included
-- Voided transations are excluded
-- Item Description is taken from Inventory Item Maintenance for all
-- inventory items, and from SOP line items for non-inventory items
-- Document Date is used (not GL Posting Date)
-- Updated Aug 29, 2011 to add Generic Description, Item Class and User Category 1
-- Updated Jan 25, 2012 to make column names Crystal-friendly 
-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

SELECT
D.ITEMNMBR Item_Number,
D.Item_Description,
D.Generic_Description,
D.Item_Class,
D.User_Category_1,
sum(case when month(D.DOCDATE) = 1 then D.SALES else 0 end) as [Jan_Sales],
sum(case when month(D.DOCDATE) = 2 then D.SALES else 0 end) as [Feb_Sales],
sum(case when month(D.DOCDATE) = 3 then D.SALES else 0 end) as [Mar_Sales],
sum(case when month(D.DOCDATE) = 4 then D.SALES else 0 end) as [Apr_Sales],
sum(case when month(D.DOCDATE) = 5 then D.SALES else 0 end) as [May_Sales],
sum(case when month(D.DOCDATE) = 6 then D.SALES else 0 end) as [Jun_Sales],
sum(case when month(D.DOCDATE) = 7 then D.SALES else 0 end) as [Jul_Sales],
sum(case when month(D.DOCDATE) = 8 then D.SALES else 0 end) as [Aug_Sales],
sum(case when month(D.DOCDATE) = 9 then D.SALES else 0 end) as [Sep_Sales],
sum(case when month(D.DOCDATE) = 10 then D.SALES else 0 end) as [Oct_Sales],
sum(case when month(D.DOCDATE) = 11 then D.SALES else 0 end) as [Nov_Sales],
sum(case when month(D.DOCDATE) = 12 then D.SALES else 0 end) as [Dec_Sales]

FROM
(SELECT SH.DOCDATE, SD.ITEMNMBR,
 coalesce(I.ITEMDESC, SD.ITEMDESC) Item_Description,
 coalesce(I.ITMGEDSC, '') Generic_Description,
 coalesce(I.ITMCLSCD,'') Item_Class,
 coalesce(I.USCATVLS_1,'') User_Category_1,
 CASE SD.SOPTYPE
     WHEN 3 THEN SD.XTNDPRCE
     WHEN 4 THEN SD.XTNDPRCE*-1
     END SALES
 FROM SOP30200 SH
 INNER JOIN
     SOP30300 SD
     ON SD.SOPNUMBE = SH.SOPNUMBE
     AND SD.SOPTYPE = SH.SOPTYPE
 LEFT OUTER JOIN
     IV00101 I
     ON I.ITEMNMBR = SD.ITEMNMBR
 WHERE SH.VOIDSTTS = 0
     AND SH.SOPTYPE IN (3,4)
     AND SD.XTNDPRCE &lt;&gt; 0
     AND SD.ITEMNMBR not like 'XXXXXXXXXXXXXXX%'
     AND year(SH.DOCDATE) = 2011 --change year as needed 
     ) D

GROUP BY D.ITEMNMBR, D.Item_Description, D.Generic_Description, D.Item_Class, 
D.User_Category_1

-- add permissions for DYNGRP
GO
GRANT SELECT ON view_Sales_by_Item_by_Month TO DYNGRP
</pre></p>
<p style="text-align:justify;"><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a>, <a href='http://victoriayudin.com/category/gp-reports-code/sop-sql-code/'>SOP SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/sales-order-processing/'>Sales Order Processing</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3760/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3760&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/08/29/sql-view-for-sales-by-item-by-month/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/08/orange-man-box.jpg?w=65" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/08/orange-man-box.jpg?w=65" medium="image">
			<media:title type="html">Orange man box</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL view for sales by item by year</title>
		<link>http://victoriayudin.com/2011/08/11/sql-view-for-sales-by-item-by-year/</link>
		<comments>http://victoriayudin.com/2011/08/11/sql-view-for-sales-by-item-by-year/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 11:56:51 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[GP Reports code]]></category>
		<category><![CDATA[GP SQL scripts]]></category>
		<category><![CDATA[SOP SQL code]]></category>
		<category><![CDATA[Sales Order Processing]]></category>
		<category><![CDATA[SQL code]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3729</guid>
		<description><![CDATA[I had a request from a blog reader for a view that shows sales of items by year. This seemed like pretty useful code to create, so I put the following view together. I am making a few assumptions (listed in the view comments), and am hard coding years from 2005 through 2011. You can easily change the years or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3729&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I had a request from a blog reader for a view that shows sales of items by year. This seemed like pretty useful code to create, so I put the following view together. I am making a few assumptions (listed in the view comments), and am hard coding years from 2005 through 2011. You can easily change the years or add new ones by following the example in my code.</p>
<p style="text-align:center;"><span style="color:#888888;">~~~~~</span></p>
<p><code>create view view_Sales_by_Item_by_Year<br />
as</code><br />
<code><span style="color:#888888;">/******************************************************************</span></code><br />
<code><span style="color:#888888;">view_Sales_by_Item_by_Year</span></code><br />
<span style="color:#808080;"><code>Created Aug 11, 2011 by Victoria Yudin - Flexible Solutions, Inc.<br />
For updates see http://victoriayudin.com/gp-reports/<br />
- Returns total sales (invoices - returns) for each item by year<br />
- Only posted invoices and returns are included<br />
- Voided transations are excluded<br />
- Item Description is taken from Inventory Item Maintenance<br />
for all inventory items,<br />
and from SOP line items for non-inventory items</code></span><br />
<span style="color:#808080;"><code>******************************************************************/</code></span></p>
<pre>SELECT 
   D.ITEMNMBR [Item_Number],
   D.Item_Description,
   sum(case when year(D.DOCDATE) = 2005
      then D.SALES else 0 end) as [2005 Sales],
   sum(case when year(D.DOCDATE) = 2006
      then D.SALES else 0 end) as [2006 Sales],
   sum(case when year(D.DOCDATE) = 2007
      then D.SALES else 0 end) as [2007 Sales],
   sum(case when year(D.DOCDATE) = 2008
      then D.SALES else 0 end) as [2008 Sales],
   sum(case when year(D.DOCDATE) = 2009
      then D.SALES else 0 end) as [2009 Sales],
   sum(case when year(D.DOCDATE) = 2010
      then D.SALES else 0 end) as [2010 Sales],
   sum(case when year(D.DOCDATE) = 2011
      then D.SALES else 0 end) as [2011 Sales]

FROM
(SELECT SH.DOCDATE, SD.ITEMNMBR,
 coalesce(I.ITEMDESC, SD.ITEMDESC) Item_Description,
 CASE SD.SOPTYPE
     WHEN 3 THEN SD.XTNDPRCE
     WHEN 4 THEN SD.XTNDPRCE*-1
     END SALES
 FROM SOP30200 SH
 INNER JOIN
     SOP30300 SD
     ON SD.SOPNUMBE = SH.SOPNUMBE
     AND SD.SOPTYPE = SH.SOPTYPE
 LEFT OUTER JOIN
     IV00101 I
     ON I.ITEMNMBR = SD.ITEMNMBR
 WHERE SH.VOIDSTTS = 0 
     AND SH.SOPTYPE IN (3,4) 
     AND SD.XTNDPRCE &lt;&gt; 0 
     AND SD.ITEMNMBR not like 'XXXXXXXXXXXXXXX%') D

GROUP BY D.ITEMNMBR, D.Item_Description

<span style="color:#339966;">/** the following will grant permissions to this view to DYNGRP, 
leave this section off if you do not want to grant permissions **/ </span></pre>
<p><code>GO<br />
GRANT SELECT ON view_Sales_by_Item_by_Year TO DYNGRP</code></p>
<p style="text-align:center;"><span style="color:#888888;">~~~~~</span></p>
<p style="text-align:justify;"><em>Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.</em></p>
<br />Filed under: <a href='http://victoriayudin.com/category/dynamics-gp/'>Dynamics GP</a>, <a href='http://victoriayudin.com/category/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/category/dynamics-gp/gp-sql-scripts/'>GP SQL scripts</a>, <a href='http://victoriayudin.com/category/gp-reports-code/sop-sql-code/'>SOP SQL code</a> Tagged: <a href='http://victoriayudin.com/tag/gp-reports-code/'>GP Reports code</a>, <a href='http://victoriayudin.com/tag/sales-order-processing/'>Sales Order Processing</a>, <a href='http://victoriayudin.com/tag/sql-code/'>SQL code</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3729/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3729&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/08/11/sql-view-for-sales-by-item-by-year/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/08/moneyman.jpg?w=96" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/08/moneyman.jpg?w=96" medium="image">
			<media:title type="html">dollar chrome symbol</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
		<item>
		<title>Management Reporter versions</title>
		<link>http://victoriayudin.com/2011/07/04/management-reporter-versions/</link>
		<comments>http://victoriayudin.com/2011/07/04/management-reporter-versions/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 13:18:10 +0000</pubDate>
		<dc:creator>Victoria Yudin</dc:creator>
				<category><![CDATA[Management Reporter]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://victoriayudin.com/?p=3714</guid>
		<description><![CDATA[I am starting to do some work with Management Reporter, so I thought it would be useful to have a list of the versions for various service pack levels. If anyone has other versions, please let me know and I will update this list. Management Reporter 2.0 SP 1 FP 1 SP 2 SP 2 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3714&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I am starting to do some work with Management Reporter, so I thought it would be useful to have a list of the versions for various service pack levels. If anyone has other versions, please let me know and I will update this list.</p>
<h3 style="text-align:center;"><span style="color:#993300;">Management Reporter 2.0</span></h3>
<table>
<tbody>
<tr>
<td style="text-align:center;"><strong>SP 1</strong></td>
<td style="text-align:center;"><strong>FP 1</strong></td>
<td style="text-align:center;"><strong>SP 2</strong></td>
<td style="text-align:center;"><strong>SP 2 Update</strong></td>
</tr>
<tr>
<td style="text-align:center;">2.0.1663.3</td>
<td style="text-align:center;">2.0.1664.19</td>
<td style="text-align:center;">2.0.1700.31</td>
<td style="text-align:center;">2.0.1700.66</td>
</tr>
</tbody>
</table>
<h3></h3>
<h3 style="text-align:center;"><span style="color:#993300;">Management Reporter 2012</span></h3>
<table>
<tbody>
<tr>
<td style="text-align:center;"><strong>RTM</strong></td>
<td style="text-align:center;"><strong>Rollup 1</strong></td>
</tr>
<tr>
<td style="text-align:center;">2.1.1026.37</td>
<td style="text-align:center;">2.1.1028.0</td>
</tr>
</tbody>
</table>
<p>Downloads for Management Reporter 2012 can be found <a title="Management Reporter 2012 downloads" href="https://mbs.microsoft.com/Cms/Templates/document/General.aspx?NRMODE=Published&amp;NRNODEGUID=%7bF8CF0C93-1AFF-483E-9598-A8415F2CB79D%7d&amp;NRORIGINALURL=%2fcustomersource%2fdownloads%2fservicepacks%2fMROverview%2ehtm&amp;NRCACHEHINT=Guest" target="_blank">here on CustomerSource</a> (you will need a login).</p>
<br />Filed under: <a href='http://victoriayudin.com/category/management-reporter/'>Management Reporter</a> Tagged: <a href='http://victoriayudin.com/tag/management-reporter/'>Management Reporter</a>, <a href='http://victoriayudin.com/tag/version/'>version</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/victoriayudin.wordpress.com/3714/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victoriayudin.wordpress.com/3714/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/victoriayudin.wordpress.com/3714/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/victoriayudin.wordpress.com/3714/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/victoriayudin.wordpress.com/3714/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/victoriayudin.wordpress.com/3714/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/victoriayudin.wordpress.com/3714/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/victoriayudin.wordpress.com/3714/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/victoriayudin.wordpress.com/3714/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/victoriayudin.wordpress.com/3714/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/victoriayudin.wordpress.com/3714/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/victoriayudin.wordpress.com/3714/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/victoriayudin.wordpress.com/3714/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/victoriayudin.wordpress.com/3714/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=victoriayudin.com&#038;blog=4884873&#038;post=3714&#038;subd=victoriayudin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://victoriayudin.com/2011/07/04/management-reporter-versions/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:thumbnail url="http://victoriayudin.files.wordpress.com/2011/07/orange-man-magnifying-glass.jpg?w=96" />
		<media:content url="http://victoriayudin.files.wordpress.com/2011/07/orange-man-magnifying-glass.jpg?w=96" medium="image">
			<media:title type="html">Orange man magnifying glass</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/17a8ce996aec3d35caf943487b6956a5?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">Victoria</media:title>
		</media:content>
	</item>
	</channel>
</rss>
