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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 17.05.2012, 06:13   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: SRS Report CustAccountStatement is hanging with Suspended Process in AX 2012 CU-2
Источник: http://blogs.msdn.com/b/axsupport/ar...2012-cu-2.aspx
==============

We recently came across an issue on Microsoft Dynamics AX 2012 RTM CU-2. When we try to run the report "Accounts receivable\reports\external\customer account statement", AX ends up hanging. This happens in every environment if I just choose a customer account and leave all else as default.

The reason we found was:

In \Classes\SrsReportRunRdpPreProcessService, executeWithContract method, there are some code shown below, there is a UserConnection ttsBegin and UserConnection ttsCommit pair embedded in global ttsBegin and ttsCommit pair, this makes the database write operation to hang.
X++:
 // switch company to that user. 
 changecompany(companyId) 
 { 
 
 // check if any pre-processing id already exists, if yes, then call cleanup, this will take care of cleaning up left over data. 
 if(_preProcessedRecId) 
 { 
 this.cleanUp(_preProcessedRecId, reportContract.parmRdpName()); 
 } 
 
 
 // starting a default transaction, since some RDP classes do delete as part of their code and they dont have a explicit ttsbegin/ttscommit.
 // they were relying on the old behvior of SrsReportRunRdpPreProcessService class starting a default ttsbegin/commit.
 
 
 ttsBegin; 
 
 
 // We start transaction before calling processReport. By doing so, all data 
 // inserted by RDP into table will have the same transactionId. 
 // Always use a UserConnection. The service is currently running on RPC call and hence if outer transaction exists we dont want it to be used. 
 
 
 userConnection = new UserConnection(true); 
 userConnection.ttsbegin(); 
 
 
 // set user connection on RDP class. 
 rdpInstance.parmUserConnection(userConnection); 
 
 
 // call processReport 
 rdpInstance.processReport(); 
 
 
 // now create a entry in table with report name etc. 
 // transactionId will be same as the one used in processReport(). 
 preProcessedTable = SrsReportPreProcessedDetails::create(reportContract.parmRdpName(), userConnection, _isPreviewData);
 
 
 // commit the transaction. 
 userConnection.ttscommit(); 
 ttsCommit; 
 }

To workaround, the suggestion is to comment out those inner transactions, so that code looks as given in the highlighted sections below:
X++:
 // switch company to that user. 
 changecompany(companyId) 
 { 
 
 
 // check if any pre-processing id already exists, if yes, then call cleanup, this will take care of cleaning up left over data. 
 if(_preProcessedRecId) 
 { 
 this.cleanUp(_preProcessedRecId, reportContract.parmRdpName()); 
 } 
 
 
 // starting a default transaction, since some RDP classes do delete as part of their code and they dont have a explicit ttsbegin/ttscommit.
 // they were relying on the old behvior of SrsReportRunRdpPreProcessService class starting a default ttsbegin/commit.
 ttsBegin; 
 
 
 // We start transaction before calling processReport. By doing so, all data 
 // inserted by RDP into table will have the same transactionId. 
 // Always use a UserConnection. The service is currently running on RPC call and hence if outer transaction exists
 // we dont want it to be used. 
 
 
 userConnection = new UserConnection(true); 
 //userConnection.ttsbegin();
 
 // set user connection on RDP class. 
 rdpInstance.parmUserConnection(userConnection); 
 
 
 // call processReport 
 rdpInstance.processReport(); 
 
 
 // now create a entry in table with report name etc. 
 // transactionId will be same as the one used in processReport(). 
 preProcessedTable = SrsReportPreProcessedDetails::create(reportContract.parmRdpName(), userConnection, _isPreviewData);
 
 
 // commit the transaction. 
 //userConnection.ttscommit(); 
 ttsCommit; 
 }

--author: Mansour Yahya Mohamad


Источник: http://blogs.msdn.com/b/axsupport/ar...2012-cu-2.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Последний раз редактировалось Poleax; 17.05.2012 в 15:13. Причина: оформление
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: Microsoft Dynamics AX 2012 Reporting extensions: Error System.Security.Permissions.EnvironmentPermission while running report Blog bot DAX Blogs 0 02.02.2012 21:11
emeadaxsupport: Opening a Report on AX 2012 raises infolog error: The default Report Server Configuration ID could not be found in the SRSServers table. Blog bot DAX Blogs 0 02.12.2011 00:13
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35

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

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

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