Tuesday, April 14, 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

1 comment:

  1. Great explanation on handling SSRS timeout errors in AX 2012! Extending SrsReportDataProviderPreProcess and adjusting the temp table properties is a solid fix that many overlook. I’ve seen similar frustrations when working on large reports where performance bottlenecks hit unexpectedly. On a different note, I ran into a similar headache recently with emulation software if anyone’s struggling, this guide on Yuzu not working might be useful. Thanks again for the detailed walkthrough here, very practical!

    ReplyDelete

What is the primary purpose of using a Solution in Microsoft Power Platform & ALM?

As organizations embrace low-code development with Microsoft Power Platform , it becomes essential to manage and govern apps, flows, and dat...