Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Batch Job fails while running the report

(0) ShareShare
ReportReport
Posted on by 2

Hi ,

      I have created a view and that view will contain the display Methods and some fields . And i have used that view in the query . And added the query to the report and tried to call the report directly using the menu item and tried using the controller class . Since the data is huge I am running the report using batch process . But getting the following Error while running the report in Batch .

Batch task failed . An error occured hen running report in batch . Please contact system adminstrator .

Previously I have faced the same issue for DataProvider class report but the following solution solved the issue 

https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/analytics/prevent-long-running-reports-timing-out

But In this report I am using the Query . 

  • Community member Profile Picture
    3 on at
    Batch Job fails while running the report

    NoobGamer did you find any answer for this?
  • NoobGamer Profile Picture
    2 on at
    RE: Batch Job fails while running the report

    Hi Martin & Mohit ,
                         Thanks for the Reply , I was tring to duplicate the standard report (Open Purchase Order report).

    Procurement and Sourcing > Purchase Order > Purchase Order Follow up > Open Purchase order report .

    Since I need to add one additional field which is not available in the purchTable , I am using the display method . First I have tried to duplicate the report and added one extra display method but it didnt display the value in the report . And later I came to know through some of the articles/posts that custom display method wont diplay in the report untill we use view . 

         So I have created the view and added it to a query and then showed the required fields in the report but Due to session timeout we are trying to run the report in the batch processing but even in the Batch process it is getting failed after some time around 1 hour . 

      since that report required dynamic filter in the dialog form I am using the query method as similar to the standard report with slight changes.

    My concern is why does it fail even in the batch processing since it is going to run in the background . whether is there is any session timeout even for batch processing ? Or should I have to change any property And I have made read user level access to the menu item too.

  • Mohit Rampal Profile Picture
    12,563 Moderator on at
    RE: Batch Job fails while running the report

    Hi, Is there any reason to have this report Query based. As you mentioned you have already resolved the issue for DataProvider class using that article.

  • Martin Dráb Profile Picture
    234,712 Most Valuable Professional on at
    RE: Batch Job fails while running the report

    If the problem is a timeout and you can't improve performance of your query, you can use the query in an RDP class and utilize pre-processing.

    First of all, consider getting rid of display methods, because they can make a huge difference on performance if they make database queries.

    For example, imagine a query fetching 10000 records. That's a single query, but if you have two display methods, each runnuing a single query, you suddenly make 20000 more queries than without display methods.

  • NoobGamer Profile Picture
    2 on at
    RE: Batch Job fails while running the report

    Hello Forum ,

             Any Reply for this issue ? And whether it can be solved ?

  • NoobGamer Profile Picture
    2 on at
    RE: Batch Job fails while running the report

    Hi,

        Can someone please reply me on this Issue ?

    When I try to create a Query report with the custom display method . I can unable to get the custom display method fields in the report , but for the standsrd display method I can get the values in the report .

      So in order to get the values of the display method I have created a view for a table and added the view to the Query based on the following example

    https://vishaldobariya.wordpress.com/2019/03/08/display-method-on-views-and-ssrs-reports-d365fo/

    But the less data batch job works !! but when the data is more Batch job fails with the error. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 565

#2
Martin Dráb Profile Picture

Martin Dráb 536 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 402 Super User 2025 Season 1

Product updates

Dynamics 365 release plans