Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Batch Job fails while ...
Finance forum
Unanswered

Batch Job fails while running the report

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 . 

  • Batch Job fails while running the report

    NoobGamer did you find any answer for this?
  • NoobGamer Profile Picture
    NoobGamer 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
    Mohit Rampal 12,540 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
    Martin Dráb 227,971 Super User 2024 Season 2 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
    NoobGamer 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
    NoobGamer 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. 

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,115 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,971 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans