<?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>Noisy Van</title>
	<atom:link href="http://noisyvan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://noisyvan.wordpress.com</link>
	<description>Just another NAVISION weblog</description>
	<lastBuildDate>Mon, 20 Oct 2008 07:39:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='noisyvan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Noisy Van</title>
		<link>http://noisyvan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://noisyvan.wordpress.com/osd.xml" title="Noisy Van" />
	<atom:link rel='hub' href='http://noisyvan.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Conventions, Or Should I Say Conversions</title>
		<link>http://noisyvan.wordpress.com/2008/10/20/conventions-or-should-i-say-conversions/</link>
		<comments>http://noisyvan.wordpress.com/2008/10/20/conventions-or-should-i-say-conversions/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 07:39:30 +0000</pubDate>
		<dc:creator>mart1n0</dc:creator>
				<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[C/AL]]></category>
		<category><![CDATA[Codeunit]]></category>
		<category><![CDATA[Conversion]]></category>

		<guid isPermaLink="false">http://noisyvan.wordpress.com/?p=58</guid>
		<description><![CDATA[Often you have to convert objects from one type to another e.g. from Integer to Text, from Boolean to Text, etc. Up to version 4.0 there was a codeunit, Codeunit 6201 &#8211; Conventions, that had a bunch of functions to convert objects from one type to another. This codeunit disappeared from version 5.0 but many [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=58&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Often you have to convert objects from one type to another e.g. from Integer to Text, from Boolean to Text, etc. Up to version 4.0 there was a codeunit, <strong>Codeunit 6201 &#8211; Conventions</strong>, that had a bunch of functions to convert objects from one type to another. This codeunit disappeared from version 5.0 but many of the functions are still useful, if not to use them than at least to give ideas for other functions or, as they did for me, to start learnig some C/AL code.</p>
<p>So have a look at the code or download the attached codeunit Conventions of which I never understood where the name came from.</p>
<p><strong>CodeToText(VarCode : Code[250];MaxLength : Integer) : Text[250]</strong><br />
IF Setup.RECORDLEVELLOCKING THEN<br />
EXIT(VarCode);<br />
EXIT(LeftPadCode(VarCode,MaxLength,&#8217; &#8216;));</p>
<p><strong>OptionToText(VarOption : Option) : Text[250]</strong><br />
EXIT(FORMAT(VarOption,0,2));</p>
<p><strong>IntegerToText(VarInteger : Integer) : Text[250]</strong><br />
EXIT(FORMAT(VarInteger,0,2));</p>
<p><strong>SQLDecimalToText(VarDecimal : Decimal) ReturnValue : Text[260]</strong><br />
DecimalSepSymbol := &#8216;.&#8217;;</p>
<p>ReturnValue :=<br />
FORMAT(VarDecimal,0,&#8217;&lt;Sign&gt;&lt;Integer&gt;&lt;Decimals&gt;&lt;Comma,&#8217; + DecimalSepSymbol + &#8216;&gt;&#8217;);</p>
<p><strong>CSDecimalToText(VarDecimal : Decimal) ReturnValue : Text[260]</strong><br />
WITH CommercePortalSetup DO BEGIN<br />
GET;<br />
CASE &#8220;Decimal Symbol&#8221; OF<br />
&#8220;Decimal Symbol&#8221;::&#8221;0&#8243;:<br />
DecimalSepSymbol := &#8216;.&#8217;;<br />
&#8220;Decimal Symbol&#8221;::&#8221;1&#8243;:<br />
DecimalSepSymbol := &#8216;,&#8217;;<br />
END;<br />
END;</p>
<p>ReturnValue :=<br />
FORMAT(VarDecimal,0,&#8217;&lt;Sign&gt;&lt;Integer&gt;&lt;Decimals&gt;&lt;Comma,&#8217; + DecimalSepSymbol + &#8216;&gt;&#8217;);</p>
<p><strong>BooleanToText(VarBoolean : Boolean) : Text[1]</strong><br />
EXIT(FORMAT(VarBoolean,1,2));</p>
<p><strong>DateToText(VarDate : Date) : Text[8]</strong><br />
IF VarDate = 0D THEN<br />
VarText := &#8217;17530101&#8242;<br />
ELSE<br />
VarText := FORMAT(VarDate,0,&#8217;&lt;Year4&gt;&lt;Month,2&gt;&lt;Day,2&gt;&#8217;);<br />
EXIT(VarText);</p>
<p><strong>TimeToText(VarTime : Time) ReturnTime : Text[16]</strong><br />
ReturnTime := FORMAT(VarTime,0,&#8217;&lt;Hours24,2&gt;:&lt;Minutes,2&gt;:&lt;Seconds,2&gt;&#8217;);<br />
IF ReturnTime = &#8221; THEN<br />
ReturnTime := &#8217;00:00:00&#8242;;</p>
<p><strong>TextToInteger(VarText : Text[250]) : Integer</strong><br />
EVALUATE(VarInteger,VarText);<br />
EXIT(VarInteger);</p>
<p><strong>TextToDecimal(VarText : Text[250]) : Decimal</strong><br />
BaseVarDecimal := 1.2;<br />
DecimalSymbol := COPYSTR(FORMAT(BaseVarDecimal),2,1);<br />
EVALUATE(VarDecimal,CONVERTSTR(VarText,&#8217;.',DecimalSymbol));<br />
EXIT(VarDecimal);</p>
<p><strong>TextToBoolean(VarText : Text[1]) : Boolean</strong><br />
IF NOT EVALUATE(VarBoolean,VarText) THEN<br />
VarBoolean := FALSE;<br />
EXIT(VarBoolean);</p>
<p><strong>TextToDate(VarText : Text[8]) : Date</strong><br />
Day := TextToInteger(COPYSTR(VarText,7,2));<br />
Month := TextToInteger(COPYSTR(VarText,5,2));<br />
Year := TextToInteger(COPYSTR(VarText,1,4));<br />
EXIT(DMY2DATE(Day,Month,Year));</p>
<p><strong>TextToTime(VarText : Text[8]) : Time</strong><br />
BaseVarTime := 111111T;<br />
TimeSeparator := COPYSTR(FORMAT(BaseVarTime),3,1);<br />
EVALUATE(VarTime,CONVERTSTR(VarText,&#8217;:',TimeSeparator));<br />
EXIT(VarTime);</p>
<p><strong>SQLEncodeText(NonEncodedText : Text[250]) : Text[250]</strong><br />
EncodedText := &#8221;;<br />
FOR i := 1 TO STRLEN(NonEncodedText) DO BEGIN<br />
EncodedText[STRLEN(EncodedText) + 1] := NonEncodedText[i];<br />
IF NonEncodedText[i] = &#8221;&#8221; THEN<br />
EncodedText := EncodedText + &#8221;&#8221;;<br />
END;<br />
EXIT(&#8221;&#8221; + EncodedText + &#8221;&#8221;)</p>
<p><strong>CSEncodeText(NonEncodedText : Text[250]) : Text[250]</strong><br />
EXIT(NonEncodedText);</p>
<p><strong>SQLEncodeCode(VarCode : Code[250];Length : Integer) : Text[250]</strong><br />
EXIT(SQLEncodeText(CodeToText(VarCode,Length)));</p>
<p><strong>CSEncodeCode(VarCode : Code[250]) : Text[250]</strong><br />
EXIT(VarCode);</p>
<p><strong>SQLEncodeOption(VarOption : Option) : Text[250]</strong><br />
EXIT(SQLEncodeText(OptionToText(VarOption)));</p>
<p><strong>CSEncodeOption(VarOption : Option) : Text[250]</strong><br />
EXIT(CSEncodeText(OptionToText(VarOption)));</p>
<p><strong>SQLEncodeInteger(VarInteger : Integer) : Text[250]</strong><br />
EXIT(SQLEncodeText(IntegerToText(VarInteger)));</p>
<p><strong>CSEncodeInteger(VarInteger : Integer) : Text[250]</strong><br />
EXIT(CSEncodeText(IntegerToText(VarInteger)));</p>
<p><strong>SQLEncodeDecimal(VarDecimal : Decimal) : Text[250]</strong><br />
EXIT(SQLEncodeText(SQLDecimalToText(VarDecimal)));</p>
<p><strong>CSEncodeDecimal(VarDecimal : Decimal) : Text[250]</strong><br />
EXIT(CSDecimalToText(VarDecimal));</p>
<p><strong>SQLEncodeBoolean(VarBoolean : Boolean) : Text[5]</strong><br />
EXIT(SQLEncodeText(BooleanToText(VarBoolean)));</p>
<p><strong>CSEncodeBoolean(VarBoolean : Boolean) : Text[5]</strong><br />
EXIT(CSEncodeText(BooleanToText(VarBoolean)));</p>
<p><strong>SQLEncodeDate(VarDate : Date) : Text[12]</strong><br />
EXIT(SQLEncodeText(DateToText(VarDate)));</p>
<p><strong>CSEncodeDate(VarDate : Date) : Text[12]</strong><br />
EXIT(CSEncodeText(DateToText(VarDate)));</p>
<p><strong>SQLEncodeTime(VarTime : Time) : Text[14]</strong><br />
EXIT(SQLEncodeText(TimeToText(VarTime)));</p>
<p><strong>SQLEncodeDateTime(VarDate : Date;VarTime : Time) : Text[19]</strong><br />
EXIT(SQLEncodeText(DateToText(VarDate) + &#8216; &#8216; + TimeToText(VarTime)));</p>
<p><strong>LeftPadCode(VarCode : Code[250];MaxLength : Integer;FillChar : Text[1]) : Text[250]</strong><br />
Length := MaxLength &#8211; STRLEN(VarCode);<br />
IF Length &lt;= 0 THEN<br />
EXIT(VarCode);<br />
EXIT(PADSTR(&#8221;,Length,FillChar) + VarCode);</p>
<p><strong>PutSynchMessageValue(VAR SynchMessageQueue : Record Table6224;No : Integer;Name : Text[190];Value : Text[250])</strong><br />
SynchMessageQueue.&#8221;No.&#8221; := No;<br />
SynchMessageQueue.Name := Name;<br />
SynchMessageQueue.Value := Value;<br />
SynchMessageQueue.INSERT;</p>
<p><strong>HEXEncode(Char : Char) : Text[3]</strong><br />
AsciiValue := Char;<br />
IF AsciiValue &gt; 255 THEN<br />
ERROR(Text000,Char);<br />
REPEAT<br />
a := AsciiValue DIV 16;<br />
b := AsciiValue &#8211; a * 16;<br />
AsciiValue := a;<br />
HexValue := COPYSTR(&#8217;0123456789ABCDEF&#8217;,b + 1,1) + HexValue;<br />
UNTIL AsciiValue = 0;</p>
<p>IF STRLEN(HexValue) &lt; 2 THEN<br />
HexValue := &#8217;0&#8242; + HexValue;</p>
<p>EXIT(&#8216;-&#8217; + HexValue);</p>
<p><strong>LinkEncode(WebSiteCode : Code[20];LinkNo : Code[20];TemplateNo : Code[20]) : Text[250]</strong><br />
IF NOT PagePropColl.GET(WebSiteCode,LinkNo,1) THEN<br />
EXIT;</p>
<p>IF (TemplateNo &lt;&gt; &#8221;) AND<br />
(PagePropColl.&#8221;Template Prop. Coll. No.&#8221; &lt;&gt; 0)<br />
THEN<br />
IF TemplPropColl.GET(<br />
WebSiteCode,PagePropColl.&#8221;Template No.&#8221;,<br />
PagePropColl.&#8221;Template Prop. Coll. No.&#8221;)<br />
THEN<br />
IF TemplPropColl.&#8221;ASP FileName&#8221; &lt;&gt; &#8221; THEN<br />
EXIT(UPPERCASE(TemplPropColl.&#8221;ASP FileName&#8221;) + &#8216;,&#8217; + LinkNo);</p>
<p><strong>RemoveBackslashIfThere(VAR Path : Text[256])</strong><br />
IF Path &lt;&gt; &#8221; THEN BEGIN<br />
IF Path[STRLEN(Path)] = &#8216;\&#8217; THEN<br />
Path := COPYSTR(Path,1,STRLEN(Path) &#8211; 1);<br />
END;</p>
<p><strong>MakeFilePath(FileFolder : Text[256];FileName : Text[256]) : Text[250]</strong><br />
IF FileName = &#8221; THEN<br />
ERROR(Text001);<br />
IF FileFolder = &#8221; THEN<br />
EXIT(FileName);</p>
<p>EXIT(FileFolder + &#8216;\&#8217; + FileName);</p>
<p><strong>ReportNonValidValue(Name : Text[150];Value : Text[256])</strong><br />
IF Value = &#8221; THEN<br />
ERROR(Text002,Name)<br />
ELSE<br />
ERROR(Text003,Value,Name);</p>
<p><strong>CheckForInvCharAndMakeDescript(FieldName : Text[250];FieldValue : Text[250];VAR Description : Text[250])</strong><br />
FOR i := 1 TO STRLEN(FieldValue) DO<br />
IF FieldValue[i] IN ['.',',',' '] THEN<br />
ERROR(Text004,FieldName);</p>
<p>IF FieldValue = &#8221; THEN<br />
Description := &#8221;<br />
ELSE<br />
Description := UPPERCASE(COPYSTR(FieldValue,1,1)) + LOWERCASE(COPYSTR(FieldValue,2));</p>
<p>Download the Codeunit by clicking the link below and renaming the file to .zip:<a href="http://noisyvan.files.wordpress.com/2008/10/cu62011.doc">Codeunit 6201, rename from .doc to .zip</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/noisyvan.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/noisyvan.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/noisyvan.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/noisyvan.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/noisyvan.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/noisyvan.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/noisyvan.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/noisyvan.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/noisyvan.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/noisyvan.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/noisyvan.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/noisyvan.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/noisyvan.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/noisyvan.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=58&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://noisyvan.wordpress.com/2008/10/20/conventions-or-should-i-say-conversions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/088f43a53b1a848c4375fdd020b6a67f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mart1n0</media:title>
		</media:content>
	</item>
		<item>
		<title>Perfect source for Postal Codes Info and Downloads</title>
		<link>http://noisyvan.wordpress.com/2008/10/16/perfect-source-for-postal-codes-info-and-downloads/</link>
		<comments>http://noisyvan.wordpress.com/2008/10/16/perfect-source-for-postal-codes-info-and-downloads/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 09:46:13 +0000</pubDate>
		<dc:creator>mart1n0</dc:creator>
				<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[Dump]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[Import]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[Postal Code]]></category>
		<category><![CDATA[ZIP Code]]></category>

		<guid isPermaLink="false">http://noisyvan.wordpress.com/?p=64</guid>
		<description><![CDATA[Not all localized versions of Dynamics NAV contain the list of postal codes and often you want to add postal codes of different countries to one database of company. I searched more than once for good lists or import files but they are hard to find and almost never free. Until I found the following [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=64&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Not all localized versions of Dynamics NAV contain the list of postal codes and often you want to add postal codes of different countries to one database of company.</p>
<p>I searched more than once for good lists or import files but they are hard to find and almost never free. Until I found the following site which has daily dumps of postal codes for most countries and for free on top of that.</p>
<p><a title="Postal Codes" href="http://www.geonames.org/postal-codes/" target="_blank">http://www.geonames.org/postal-codes/</a></p>
<p>The site has a lot of info about the format of postal codes, perfect if you want to validate postal codes that are entered in the application. Some usefull maps showing which area/county/province has which postal codes and a bunch of links to sites with more info.</p>
<p>But the most interesting are of course the <strong>daily dumps of postal codes</strong>, flat files with all postal codes of most countries. You can find the daily dump here:</p>
<p><a title="Daily Dump of Postal Codes" href="http://download.geonames.org/export/zip/" target="_blank">http://download.geonames.org/export/zip/</a></p>
<p>All this is free so if you use their files a lot I would suggest making a donations, I guess everything helps, even the small bits and hey where else are you going to find all this for free?</p>
<p><a title="Donations" href="http://www.geonames.org/donations.html" target="_blank">http://www.geonames.org/donations.html</a></p>
<p><strong>Be aware that</strong> the Data is provided &#8220;as is&#8221; without warranty or any representation of accuracy, timeliness or completeness. It is licensed under a creative commons BY license. This means you can use the dump as long as you give credit to GeoNames (a link on your website to www.geonames.org is ok) : <a title="Creative Commons" href="http://creativecommons.org/licenses/by/3.0/" target="_blank">http://creativecommons.org/licenses/by/3.0/</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/noisyvan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/noisyvan.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/noisyvan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/noisyvan.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/noisyvan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/noisyvan.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/noisyvan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/noisyvan.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/noisyvan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/noisyvan.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/noisyvan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/noisyvan.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/noisyvan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/noisyvan.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=64&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://noisyvan.wordpress.com/2008/10/16/perfect-source-for-postal-codes-info-and-downloads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/088f43a53b1a848c4375fdd020b6a67f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mart1n0</media:title>
		</media:content>
	</item>
		<item>
		<title>Make Exporting Excel Formulas Fully Multilanguage Aware</title>
		<link>http://noisyvan.wordpress.com/2008/10/09/make-exporting-excel-formulas-fully-multilanguage-aware/</link>
		<comments>http://noisyvan.wordpress.com/2008/10/09/make-exporting-excel-formulas-fully-multilanguage-aware/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 16:18:39 +0000</pubDate>
		<dc:creator>mart1n0</dc:creator>
				<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[C/AL]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Multilanguage]]></category>

		<guid isPermaLink="false">http://noisyvan.wordpress.com/?p=32</guid>
		<description><![CDATA[I have been struggling with exporting data from Dynamics NAV to Excel Spreadsheets including formulas lately. I had the problem with a custom developed export to excel so I checked the code in the Excel Buffer table to see how standard Navision solved the problem only to see that the problem also existed in standard [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=32&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been struggling with exporting data from Dynamics NAV to Excel Spreadsheets including formulas lately. I had the problem with a custom developed export to excel so I checked the code in the Excel Buffer table to see how standard Navision solved the problem only to see that the problem also existed in standard NAV too.</p>
<p>Let&#8217;s explain the problem first. What happens is that for people with a Microsoft Office version in Language A and a Dynamics NAV client in language B, Navision does not translate the formulas correctly. You can reproduce it as follows.</p>
<p>Make sure the language of your Dynamics NAV client and of Microsoft Office are different. Open your Dynamics NAV client go to the Budget form and run the &#8220;Export to Excel &#8230;&#8221; function. You&#8217;ll see that the formulas aren&#8217;t be translated as they should, giving errors in Excel.</p>
<div id="attachment_42" class="wp-caption alignnone" style="width: 560px"><a href="http://noisyvan.files.wordpress.com/2008/10/nueva-imagen2.png"><img class="size-full wp-image-42" title="English NAV Client and Spanish Office, wrong formula" src="http://noisyvan.files.wordpress.com/2008/10/nueva-imagen2.png?w=550&#038;h=244" alt="English NAV Client and Spanish Office, wrong formula" width="550" height="244" /></a><p class="wp-caption-text">English NAV Client and Spanish Office, wrong formula</p></div>
<p>Standard Dynamics NAV uses multilanguage text constants to translate the Formulas in the Excel Buffer table. The problem is that this only works if your Microsoft Office language equals your Dynamics NAV Client language and on top of this, for it to work you need to translate <strong>ALL</strong> the formulas you want to use to <strong>ALL</strong> the languages you want to use. Not a fun thing to do but feel free to use a page like this <a title="fonctions XL en 9 langues" href="http://cherbe.free.fr/traduc_fonctions_xl97.html" target="_blank">fonctions XL en 9 langues</a> or this <a title="Microsoft Excel function translations" href="http://dolf.trieschnigg.nl/excel/excel.html" target="_blank">Microsoft Excel function translations</a> to get started putting all your formulas into multilanguage text constants.</p>
<p>Since we have some workstations where the Dynamics NAV client and Microsoft Office use a different language, I was looking for something better and <a title="NAV 4.0, Localized Excel and property Formula" href="http://www.mibuso.com/forum/viewtopic.php?f=5&amp;t=20057&amp;hilit=excel+formula" target="_blank">this post on mibuso</a> handed me the solution. Below I put the code if you want this feature to work for the Excel Buffer table but you&#8217;ll see that it is easy to adopt it to all of you custom code that exports to Excel with formulas.</p>
<p><strong>Table 370 &#8211; Excel Buffer</strong></p>
<p>Add the following local variables to the <strong>CreateSheet </strong>function:</p>
<ul>
<li><strong>autScriptControl</strong> Automation variable with SubType &#8216;Microsoft Script Control 1.0&#8242;.ScriptControl</li>
<li><strong>txtCode</strong> Text variable with Length 1024</li>
<li><strong>autDictionary</strong> Automation variable with Subtype &#8216;Microsoft Scripting Runtime&#8217;.Dictionary</li>
<li><strong>txtFormula</strong> Text variable with Length 1024</li>
<li><strong>intI</strong> Integer variable</li>
</ul>
<p>Remove all languages but English from the text constants SUM, SUMIF and others should there be others.</p>
<p>Change to code of the <strong>CreateSheet</strong> function as below:</p>
<pre>XlWrkSht.Name := SheetName;
IF ReportHeader &lt;&gt; '' THEN
XlWrkSht.PageSetup.LeftHeader :=
STRSUBSTNO('%1%2%1%3%4',GetExcelReference(1),ReportHeader,CRLF,CompanyName);
XlWrkSht.PageSetup.RightHeader :=
STRSUBSTNO(Text006,GetExcelReference(2),GetExcelReference(3),CRLF,UserID2);
XlWrkSht.PageSetup.Orientation := XlLandscape;
IF FIND('-') THEN BEGIN
<strong>//CRQ.001 start insert
CREATE(autDictionary);
CREATE(autScriptControl);
//CRQ.001 end insert</strong>
REPEAT
RecNo := RecNo + 1;
Window.UPDATE(1,ROUND(RecNo / TotalRecNo * 10000,1));
IF NumberFormat &lt;&gt; '' THEN
XlWrkSht.Range(xlColID + xlRowID).NumberFormat := NumberFormat;
<strong>//CRQ.001 delete start
//  IF Formula = '' THEN
//    XlWrkSht.Range(xlColID + xlRowID).Value := "Cell Value as Text"
//  ELSE
//    XlWrkSht.Range(xlColID + xlRowID).Formula := GetFormula;
//CRQ.001 delete end
//CRQ.001 start insert
IF Formula = '' THEN
XlWrkSht.Range(xlColID + xlRowID).Value := "Cell Value as Text"
ELSE BEGIN
txtFormula := GetFormula();
txtCode :='objCell.Formula=objList.Item(1);';
intI := 1;
autScriptControl.Language := 'JScript';
autScriptControl.AddObject('objCell', XlWrkSht.Range(xlColID + xlRowID));// Add excel cell object
autScriptControl.AddObject('objList', autDictionary);                    // Add dictionary object
autDictionary.Add(intI,txtFormula);                                      // Add formula to dictionary object
autScriptControl.ExecuteStatement(txtCode);                              // Execute javascript
autDictionary.RemoveAll();                                               // Remove item from dictionary
autScriptControl.Reset();                                                // Reset Script object for next using
END;
//CRQ.001 end insert</strong>
IF Comment &lt;&gt; '' THEN
XlWrkSht.Range(xlColID + xlRowID).AddComment := Comment;
IF Bold THEN
XlWrkSht.Range(xlColID + xlRowID).Font.Bold := Bold;
IF Italic THEN
XlWrkSht.Range(xlColID + xlRowID).Font.Italic := Italic;
XlWrkSht.Range(xlColID + xlRowID).Borders.LineStyle := XlLineStyleNone;
IF Underline THEN
XlWrkSht.Range(xlColID + xlRowID).Borders.Item(XlEdgeBottom).LineStyle := XlContinuous;
UNTIL NEXT = 0;
<strong>//CRQ.001 start insert
CLEAR(autDictionary);
CLEAR(autScriptControl);
//CRQ.001 end insert</strong>
XlWrkSht.Range(GetExcelReference(5) + ':' + xlColID + xlRowID).Columns.AutoFit;
END;</pre>
<p>Let&#8217;s have a look at the &#8220;Export to Excel &#8230;&#8221; function on the Budget form again.</p>
<div id="attachment_43" class="wp-caption alignnone" style="width: 560px"><a href="http://noisyvan.files.wordpress.com/2008/10/nueva-imagen-1.png"><img class="size-full wp-image-43" title="English NAV Client and Spanish Office, correct formula" src="http://noisyvan.files.wordpress.com/2008/10/nueva-imagen-1.png?w=550&#038;h=244" alt="English NAV Client and Spanish Office, correct formula" width="550" height="244" /></a><p class="wp-caption-text">English NAV Client and Spanish Office, correct formula</p></div>
<p>That&#8217;s all, it is that simple, no more text constants, no more looking for translations of a formula, just put all your fomulas in English and let Excel do the work. Please let me know if you know a faster/better/cleaner way to do this.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/noisyvan.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/noisyvan.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/noisyvan.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/noisyvan.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/noisyvan.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/noisyvan.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/noisyvan.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/noisyvan.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/noisyvan.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/noisyvan.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/noisyvan.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/noisyvan.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/noisyvan.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/noisyvan.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=32&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://noisyvan.wordpress.com/2008/10/09/make-exporting-excel-formulas-fully-multilanguage-aware/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/088f43a53b1a848c4375fdd020b6a67f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mart1n0</media:title>
		</media:content>

		<media:content url="http://noisyvan.files.wordpress.com/2008/10/nueva-imagen2.png" medium="image">
			<media:title type="html">English NAV Client and Spanish Office, wrong formula</media:title>
		</media:content>

		<media:content url="http://noisyvan.files.wordpress.com/2008/10/nueva-imagen-1.png" medium="image">
			<media:title type="html">English NAV Client and Spanish Office, correct formula</media:title>
		</media:content>
	</item>
		<item>
		<title>Show Shipment Information on Sales Invoices</title>
		<link>http://noisyvan.wordpress.com/2008/10/08/show-shipment-information-on-sales-invoices/</link>
		<comments>http://noisyvan.wordpress.com/2008/10/08/show-shipment-information-on-sales-invoices/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 07:08:16 +0000</pubDate>
		<dc:creator>mart1n0</dc:creator>
				<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[C/AL]]></category>
		<category><![CDATA[Invoice]]></category>
		<category><![CDATA[Shipment]]></category>

		<guid isPermaLink="false">http://noisyvan.wordpress.com/?p=19</guid>
		<description><![CDATA[When using combined shipments or when using the &#8220;Get Shipment Lines&#8230;&#8221; function on the invoice form, a line with shipment information is shown for all shipments linked to the invoice lines. This is very useful information for the customer and for customer service. It gives them a direct link between shipments and the invoices. Unfortunately [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=19&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When using combined shipments or when using the &#8220;Get Shipment Lines&#8230;&#8221; function on the invoice form, a line with shipment information is shown for all shipments linked to the invoice lines.</p>
<div id="attachment_20" class="wp-caption alignnone" style="width: 728px"><a href="http://noisyvan.files.wordpress.com/2008/10/screenshot-108-cronus-international-ltd-microsoft-dynamics-nav.png"><img class="size-full wp-image-20" title="screenshot-108-cronus-international-ltd-microsoft-dynamics-nav" src="http://noisyvan.files.wordpress.com/2008/10/screenshot-108-cronus-international-ltd-microsoft-dynamics-nav.png?w=718&#038;h=455" alt="Sales Invoice with shipment information." width="718" height="455" /></a><p class="wp-caption-text">Sales Invoice with shipment information.</p></div>
<p>This is very useful information for the customer and for customer service. It gives them a direct link between shipments and the invoices. Unfortunately this information line is not added when you &#8220;Ship and Invoice&#8221; an Order.</p>
<p>With the following adjustment to codeunit 80, the extra line is also added when you post &#8220;Ship and Invoice&#8221; an order.</p>
<p><strong>Codeunit 80 &#8211; Sales-Post</strong></p>
<pre>...
IF Invoice THEN BEGIN
// Insert invoice line or credit memo line
IF "Document Type" IN ["Document Type"::Order,"Document Type"::Invoice] THEN BEGIN

//insertion start
//Add shipment info if this is the first line of an invoice and there is shipping info.
recSalesInvLines.SETRANGE("Document No.",SalesInvHeader."No.");
IF recSalesInvLines.ISEMPTY AND (SalesShptHeader."No." &lt;&gt; '') AND (SalesShptHeader."Shipment Date" &lt;&gt; 0D) THEN BEGIN
SalesInvLine.INIT;
SalesInvLine."Document No." := SalesInvHeader."No.";
SalesInvLine.Description :=
STRSUBSTNO(Text92000,SalesShptHeader."No.",SalesShptHeader."Shipment Date");
SalesInvLine.INSERT;
END;
//insertion end

SalesInvLine.INIT;
SalesInvLine.TRANSFERFIELDS(TempSalesLine);
SalesInvLine."Document No." := SalesInvHeader."No.";
SalesInvLine.Quantity := TempSalesLine."Qty. to Invoice";
SalesInvLine."Quantity (Base)" := TempSalesLine."Qty. to Invoice (Base)";
...</pre>
<p>Multilanguage Value of Text92000: ENU=Shipment No. %1 of %2:;DES=Lieferung Nr. %1 vom %2:;ITS=Fornitura Nr. %1 del %2:;FRS=Livraison n° %1 du %2.</p>
<p>A text line with the Shipment No. and the Shipment Date will now be added to the invoice every time you ship and invoice an order.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/noisyvan.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/noisyvan.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/noisyvan.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/noisyvan.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/noisyvan.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/noisyvan.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/noisyvan.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/noisyvan.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/noisyvan.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/noisyvan.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/noisyvan.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/noisyvan.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/noisyvan.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/noisyvan.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=19&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://noisyvan.wordpress.com/2008/10/08/show-shipment-information-on-sales-invoices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/088f43a53b1a848c4375fdd020b6a67f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mart1n0</media:title>
		</media:content>

		<media:content url="http://noisyvan.files.wordpress.com/2008/10/screenshot-108-cronus-international-ltd-microsoft-dynamics-nav.png" medium="image">
			<media:title type="html">screenshot-108-cronus-international-ltd-microsoft-dynamics-nav</media:title>
		</media:content>
	</item>
		<item>
		<title>Avoid &#8220;not a valid time unit&#8221; Errors with Multilanguage Calcdates</title>
		<link>http://noisyvan.wordpress.com/2008/10/05/avoid-not-a-valid-time-unit-errors-with-multilanguage-calcdates/</link>
		<comments>http://noisyvan.wordpress.com/2008/10/05/avoid-not-a-valid-time-unit-errors-with-multilanguage-calcdates/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 13:14:11 +0000</pubDate>
		<dc:creator>mart1n0</dc:creator>
				<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[C/AL]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[Multilanguage]]></category>

		<guid isPermaLink="false">http://noisyvan.wordpress.com/?p=14</guid>
		<description><![CDATA[I had some problems with a German report giving errors when I tried to run it. The people that programmed it put not only the comments in German, but also all calcdates. As all calcdates where entered in German when I ran the report in an English client, I got an error that &#8216;-1T&#8217; was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=14&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had some problems with a German report giving errors when I tried to run it. The people that programmed it put not only the comments in German, but also all calcdates.</p>
<p>As all calcdates where entered in German when I ran the report in an English client, I got an error that &#8216;-1T&#8217; was not a valid time unit. This is because in English you need to write D for day not T for Tage.</p>
<p>To avoid errors like this and make your reports multilanguage, always write your date formulas in English surrounded by &#8216;&lt;&#8217; and &#8216;&gt;&#8217;. The report will now use the correct date calculation mo matter what the language of the client is.</p>
<p><strong>Example:</strong> CALCDATE(&#8216;+12M-1T&#8217;,BeginnGeschäftsjahr) becomes CALCDATE(&#8216;&lt;+12M-1D&gt;&#8217;,BeginnGeschäftsjahr).</p>
<div id="attachment_15" class="wp-caption alignnone" style="width: 470px"><a href="http://noisyvan.files.wordpress.com/2008/10/screenshot-107-de-navision-remote-desktop.png"><img class="size-full wp-image-15" title="The date formula '-1T' should include a time unit." src="http://noisyvan.files.wordpress.com/2008/10/screenshot-107-de-navision-remote-desktop.png?w=460&#038;h=125" alt="The date formula '-1T' should include a time unit." width="460" height="125" /></a><p class="wp-caption-text">The date formula &#39;-1T&#39; should include a time unit.</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/noisyvan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/noisyvan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/noisyvan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/noisyvan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/noisyvan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/noisyvan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/noisyvan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/noisyvan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/noisyvan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/noisyvan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/noisyvan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/noisyvan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/noisyvan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/noisyvan.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=14&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://noisyvan.wordpress.com/2008/10/05/avoid-not-a-valid-time-unit-errors-with-multilanguage-calcdates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/088f43a53b1a848c4375fdd020b6a67f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mart1n0</media:title>
		</media:content>

		<media:content url="http://noisyvan.files.wordpress.com/2008/10/screenshot-107-de-navision-remote-desktop.png" medium="image">
			<media:title type="html">The date formula '-1T' should include a time unit.</media:title>
		</media:content>
	</item>
		<item>
		<title>Storing Password in SSIS Packages</title>
		<link>http://noisyvan.wordpress.com/2008/07/01/storing-password-in-ssis-packages/</link>
		<comments>http://noisyvan.wordpress.com/2008/07/01/storing-password-in-ssis-packages/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 20:26:24 +0000</pubDate>
		<dc:creator>mart1n0</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[BIDS]]></category>
		<category><![CDATA[Business Intelligence Development Studio]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://noisyvan.wordpress.com/?p=7</guid>
		<description><![CDATA[Recently I had to make an SSIS package where data was loaded from an external database (Oracle in my case) to a SQL Server 2005 database. All went well except one thing. How to save the Oracle and SQL 2005 connection credentials encrypted in the package? I wanted to store the credentials in a way [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=7&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I had to make an SSIS package where data was loaded from an external database (Oracle in my case) to a SQL Server 2005 database.</p>
<p>All went well except one thing. How to save the Oracle and SQL 2005 connection credentials encrypted in the package? I wanted to store the credentials in a way that a user with rights to execute the package, could do this without seeing the credentials of the databases the package connects to.</p>
<p>I tried all kind <em>ProtectionLevel</em> settings in <em><span>Business Intelligence Development Studio</span></em><span> but nothing worked. I tried with a configuration file, which worked but this left the connection data visible for people with access to the configuration file.</span></p>
<p>The only <em>ProtectionLevel</em> I did not managed to save the package with was <em>ServerStorage</em>. When I tried to save the package I always got the following message:</p>
<p><a href="http://noisyvan.files.wordpress.com/2008/07/screenshot-007-app1-ebu-remote-desktop.png"><img class="alignnone size-full wp-image-8" src="http://noisyvan.files.wordpress.com/2008/07/screenshot-007-app1-ebu-remote-desktop.png?w=440&#038;h=134" alt="Failure Saving Package" width="440" height="134" /></a></p>
<p>In the end it seemed that the only way to set this property and to save the file without error is using <em>Save Copy of Package.dtsx As&#8230;</em>.</p>
<ol>
<li>Select File &gt; Save Copy of Package.dtsx As &#8230;<br />
<a href="http://noisyvan.files.wordpress.com/2008/07/screenshot-008-app1-ebu-remote-desktop.png"><img class="alignnone size-full wp-image-9" src="http://noisyvan.files.wordpress.com/2008/07/screenshot-008-app1-ebu-remote-desktop.png?w=413&#038;h=186" alt="Save Copy of Package As ..." width="413" height="186" /></a></li>
<li>Select the server and location where you want to save the package and click on the button with a dot next to the greyed out protection level.<br />
<a href="http://noisyvan.files.wordpress.com/2008/07/screenshot-010-app1-ebu-remote-desktop.png"><img class="alignnone size-full wp-image-10" src="http://noisyvan.files.wordpress.com/2008/07/screenshot-010-app1-ebu-remote-desktop.png?w=384&#038;h=340" alt="Save Copy of Package" width="384" height="340" /></a></li>
<li><span><span>Now you can change the package protection level to the last option &#8220;Rely on server storage and roles for access control&#8221;.<br />
</span></span><a href="http://noisyvan.files.wordpress.com/2008/07/screenshot-011-app1-ebu-remote-desktop.png"><img class="alignnone size-full wp-image-11" src="http://noisyvan.files.wordpress.com/2008/07/screenshot-011-app1-ebu-remote-desktop.png?w=375&#038;h=184" alt="Rely on server storage and roles for access control" width="375" height="184" /></a></li>
</ol>
<p>Now everyone that has access to execute the package will be able to execute it without getting errors that the credentials of the datbases the package connects to are invalid or &#8220;Failed to decrypt protected XML node &#8230;&#8221;  errors.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/noisyvan.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/noisyvan.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/noisyvan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/noisyvan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/noisyvan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/noisyvan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/noisyvan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/noisyvan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/noisyvan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/noisyvan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/noisyvan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/noisyvan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/noisyvan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/noisyvan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/noisyvan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/noisyvan.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=7&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://noisyvan.wordpress.com/2008/07/01/storing-password-in-ssis-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/088f43a53b1a848c4375fdd020b6a67f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mart1n0</media:title>
		</media:content>

		<media:content url="http://noisyvan.files.wordpress.com/2008/07/screenshot-007-app1-ebu-remote-desktop.png" medium="image">
			<media:title type="html">Failure Saving Package</media:title>
		</media:content>

		<media:content url="http://noisyvan.files.wordpress.com/2008/07/screenshot-008-app1-ebu-remote-desktop.png" medium="image">
			<media:title type="html">Save Copy of Package As ...</media:title>
		</media:content>

		<media:content url="http://noisyvan.files.wordpress.com/2008/07/screenshot-010-app1-ebu-remote-desktop.png" medium="image">
			<media:title type="html">Save Copy of Package</media:title>
		</media:content>

		<media:content url="http://noisyvan.files.wordpress.com/2008/07/screenshot-011-app1-ebu-remote-desktop.png" medium="image">
			<media:title type="html">Rely on server storage and roles for access control</media:title>
		</media:content>
	</item>
		<item>
		<title>Too Many Invoice Copies</title>
		<link>http://noisyvan.wordpress.com/2008/06/30/too-many-invoice-copies/</link>
		<comments>http://noisyvan.wordpress.com/2008/06/30/too-many-invoice-copies/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 21:47:34 +0000</pubDate>
		<dc:creator>mart1n0</dc:creator>
				<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[Report]]></category>

		<guid isPermaLink="false">http://noisyvan.wordpress.com/?p=3</guid>
		<description><![CDATA[Ever had the &#8220;Too many copies are printed!&#8221; problem? Your customer wants to prints an invoice copy when posting invoices. So you set the Invoice Copies field on the Invocing tab of the Customer Card to 1. Problem is, now the program will always print an invoice copy even when you manually reprint a posted [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=3&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever had the &#8220;Too many copies are printed!&#8221; problem? Your customer wants to prints an invoice copy when posting invoices. So you set the <em>Invoice Copies</em> field on the Invocing tab of the Customer Card to 1.</p>
<p>Problem is, now the program will always print an invoice copy even when you manually reprint a posted invoice. Even though the option tab of the report shows <em>No. Of Copies</em> = 0 , a copy will be printed. If you change the <em>No. Of Copies</em> to 1, the system prints 2 copies, it doesn&#8217;t make sense!</p>
<p>The happens because of the following line of code in the <em>CopyLoop OnPreDataItem() trigger</em>:</p>
<pre>NoOfLoops := ABS(NoOfCopies) + Cust."Invoice Copies" + 1;</pre>
<p>The system actually takes the sum of the <em>No. of Copies</em> on the option tab and the <em>Invoice Copies</em> on the Customer Card to calculate how many copies it will print, this makes it impossible no to print an invoice copy when reprinting posted invoices, which is probable not what you want.</p>
<p>I used the solution below which will use the <em>Invoice Copies</em> field on the customer card to calculate the no. of copies when posting and the <em>No. of Copies</em> on the option tab of the report when manually printing a posted invoice, not the sum of both.</p>
<p>In the The <em>CopyLoop OnPreDataItem()</em> I changed</p>
<pre>NoOfLoops := ABS(NoOfCopies) + Cust."Invoice Copies" + 1;</pre>
<p>to</p>
<pre>IF blManuallyOpened THEN
  NoOfLoops := ABS(NoOfCopies) + 1
ELSE
  NoOfLoops := Cust."Invoice Copies" + 1;</pre>
<p>And in the <em>CopyLoop &#8211; OnOpenForm() trigger</em> I added the following line:</p>
<pre>blManuallyOpened := TRUE;</pre>
<p>Since the <em>CopyLoop &#8211; OnOpenForm() trigger</em> is only run when you open the report manually, it will now use the info from the customer card to calculate copies when posting and the info from the option tab of the report to calculate copies when printing manually.</p>
<p>Below you see the screens where the no. of copies are set.</p>
<p><a href="http://noisyvan.files.wordpress.com/2008/06/screenshot-003.png"><img class="alignnone size-full wp-image-4" src="http://noisyvan.files.wordpress.com/2008/06/screenshot-003.png?w=383&#038;h=256" alt="Sales - Invoice, Option Tab" width="383" height="256" /></a></p>
<p><a href="http://noisyvan.files.wordpress.com/2008/06/screenshot-005-cronus-international-ltd-microsoft-dynamics-nav.png"><img class="alignnone size-full wp-image-5" src="http://noisyvan.files.wordpress.com/2008/06/screenshot-005-cronus-international-ltd-microsoft-dynamics-nav.png?w=450&#038;h=194" alt="Customer Card, Invoicing Tab" width="450" height="194" /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/noisyvan.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/noisyvan.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/noisyvan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/noisyvan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/noisyvan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/noisyvan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/noisyvan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/noisyvan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/noisyvan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/noisyvan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/noisyvan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/noisyvan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/noisyvan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/noisyvan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/noisyvan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/noisyvan.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=noisyvan.wordpress.com&amp;blog=1836582&amp;post=3&amp;subd=noisyvan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://noisyvan.wordpress.com/2008/06/30/too-many-invoice-copies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/088f43a53b1a848c4375fdd020b6a67f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mart1n0</media:title>
		</media:content>

		<media:content url="http://noisyvan.files.wordpress.com/2008/06/screenshot-003.png" medium="image">
			<media:title type="html">Sales - Invoice, Option Tab</media:title>
		</media:content>

		<media:content url="http://noisyvan.files.wordpress.com/2008/06/screenshot-005-cronus-international-ltd-microsoft-dynamics-nav.png" medium="image">
			<media:title type="html">Customer Card, Invoicing Tab</media:title>
		</media:content>
	</item>
	</channel>
</rss>
