AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 23.04.2008, 12:55   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
Form tab captions that contain country specific characters (for example, Å in Swedish) will be displayed differently in MS Word/Excel, when using local language version of MS Office. For example, if running Nav 5.0 SE version and Customer card the first tab on the card (General) will be displayed as Allmõnt instead of Allmänt when sent to Word (when using local MS Office version).





A workaround is suggested here for both Word and Excel. To correct this, a character translation is needed, based on conversion of decimal codes of characters exported. The following example illustrates how this could be corrected.





Note, decimal character codes used in this example are character codes for characters Гµ and Г¤ described in the scenario


Гµ ansi decimal code 143


Г¤ ansi decimal code 197


and can be found in ANSI character set table referred to at the bottom of the blog.





For style sheets used for Word documents:





Open the style sheet file in notepad, default file is NavisionFormToWord, placed in Stylesheet folder of the Client folder.


Browse to the following section and replace the section





</w:wordDocument>


</xsl:template>


<xsl:template name="output-fonts">





with


</w:wordDocument>


</xsl:template>


<xsl:variable name="nbsp1"></xsl:variable>


<xsl:variable name="nbsp2">Å</xsl:variable>


<xsl:template name="output-fonts">





Then browse to the following section





<xsl:template match="Control[@type='TabPage']">





find the first occurance of the following line and replace the line





<xsl:value-of select="@caption"/>





With





<xsl:value-of select="translate(@caption,$nbsp1,$nbsp2)"/>








For style sheets used for Excel documents:





Open the style sheet file in notepad, default file is NavisionFormToExcel, placed in Stylesheet folder of the Client folder.


Browse to the following section and replace the section





<xsl:variable name="DecimalSeparator" select="Object/DecimalSeparator"/>


With





<xsl:variable name="DecimalSeparator" select="Object/DecimalSeparator"/>


<xsl:variable name="nbsp1"></xsl:variable>


<xsl:variable name="nbsp2">Å</xsl:variable>








Then browse to the following section and replace the section





<xsl:template match="Control[@type='TabPage']">


<Worksheet xmlns="urn:schemas-microsoft-comffice:spreadsheet">


<xsl:attribute name="ss:Name">


<xsl:value-of select="@caption"/>


</xsl:attribute>





with





<xsl:template match="Control[@type='TabPage']">


<Worksheet xmlns="urn:schemas-microsoft-comffice:spreadsheet">


<xsl:attribute name="ss:Name">


<xsl:value-of select="translate(@caption,$nbsp1,$nbsp2)"/>


</xsl:attribute>








Finally, find the following section and replace the section





<Cell ss:StyleID="tabCaption">
<Data ss:Type="String">
<xsl:value-of select="@caption"/>
</Data>
</Cell>





With





<Cell ss:StyleID="tabCaption">
<Data ss:Type="String">
<xsl:value-of select="translate(@caption,$nbsp1,$nbsp2)"/>
</Data>
</Cell>








*************************************************************





Note that a variable can be added for each character this applies to.


So to correct 2 such characters one can for example add 4 variables (one for ansi code of each character as shown in Nav and Office).





<xsl:variable name="nbsp1">÷</xsl:variable>


<xsl:variable name="nbsp2">ö</xsl:variable>


<xsl:variable name="nbsp3"></xsl:variable>


<xsl:variable name="nbsp4">Å</xsl:variable>





And translate functions can be nested, so the line





<xsl:value-of select="@caption"/>





is then replaced with





<xsl:value-of select="translate(translate(@caption,$nbsp1,$nbsp2),$nbsp3,$nbsp4)"/>








The following link contains character table for ANSI.


http://msdn2.microsoft.com/en-us/library/aa771694.aspx





************************************************************************





Jasminka Vukovic


Microsoft Dynamics NO
Microsoft Customer Service and Support (CSS) EMEA


These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.



Читать дальше
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 


Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 10:04.