Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

Table locked when multiple users run the SSRS report at the same time

$
0
0

Hello ALL,

I have developed a SSRS report using RDP class(extending 'SRSReportDataProviderPreProcess') and table(regular).  Also using the controller class to perform some post reportrun tasks (extending 'SrsReportRunController' class)

protected void postReportRun(SRSReportExecutionInfo _executionInfo)
{
    super(_executionInfo); // This should delete the data in table after the report has run according to my knowledge
}

RDP class processReport method
Everything is working fine when one user is running the report at a time, data is populated correctly and data is deleted from the table after the report has run.
But when two or more users run the report at the same time. data is being duplicated and not deleted after the report has run.
I tried to do the following in the RDP class Process Report method
public void processReport()
{
        ANT_AvalaraDailyReportContract  contract = this.parmDataContract() as ANT_AvalaraDailyReportContract;
   
    delete_from tmpAvalaraDailyReport
        where tmpAvalaraDailyReport.createdBy == curUserId(); // Making sure data is deleted before the report starts running
.......................
.......................
}
Deleting the data from the table for that user before the running of the report starts, but when i checked the SQL activity monitor,
the query (delete from table) is locking the table and making it to suspended status resulting in failure to to run the report.

Please advise on how to approach this issue when two users are running the report. Many thanks in advance




Viewing all articles
Browse latest Browse all 175888

Trending Articles