Tuesday 14 April 2015

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond - In Axapta 2012

Hello Guys...!

Some time we get below error while running SSRS reports in Ax 2012.

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond


Reason : 

Dynamics AX 2012 uses SQL Server Reporting Services for rendering reports. SSRS gets the data from AOS by using a custom SSRS Extension that uses WCF to communicate with AOS.


Depending on the size of the data and the complexity of the report, it might take a long time for the report to execute, resulting in various timeout and other thresholds being hit, which might cause the report rendering to fail.

Solution :

Below are the steps With Example:

In Ax 2012 Project management and accounting -> Reports - > Actual Transactions -> Project Actual Transactions.

While running this report i got the same error.

Solution :

1) To extend the SRSReportDataProviderPreProcess class instead of SRSReportDataProviderBase class
     
    //class ProjListProjProfitLossProjDP extends SRSReportDataProviderBase
     class ProjListProjProfitLossProjDP extends SrsReportDataProviderPreProcess

2) Set the user connection in processReport method after the contract method initialization
        
// Set the user connection to use on table.
// This is required to ensure that createdTransactionId of inserted record is different than default transaction.
projListProjProfitLossTmp.setConnection(this.parmUserConnection());

3) To change the property of the temp table like below,
    a) Table Type = Regular
    b) Created by = Yes
    c) Created Transaction Id = Yes

4) Open the Report in visual studio and refresh the Data set (make sure createTransactionId field is appear in the Data Set)

5) Save and deploy the Report.

6) Do the Incremental CIL

7) Restart SSRS service


@Rahul Talasila

No comments:

Post a Comment

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...