Solved

Sales order report error v 15.2

  • 8 August 2022
  • 3 replies
  • 72 views

Userlevel 6
Badge +11

Hi - i have a sales order that throws an error when I try to generate a sales order report (it works for other sales orders). Have tested both Astea client and web employee portal. The error message is as follows:

In the server log I find this:

Message body:
Astea.AO.Reporting.ReportManager.GetDocument() failed
Report Name: Sales_Order_Report
Report Name: Sales_Order_Report
SessionID: 133691c5-507d-4755-9ef2-6884877fa2feWLN
Culture Name: en-US
Language: 
Find XML: <Find entity_name="ActiveReports" query_name="Report"  getRecordCount="false" order_id="SL2208080005@@1" ><operators values="=;"/><types values="string;"/><is_replace_alias values="Y;"/></Find>
Error details: Exception has been thrown by the target of an invocation.

Object reference not set to an instance of an object.
   at Script.ReportScript.ActiveReport_FetchData(Boolean EOF)

icon

Best answer by bskallerud 9 August 2022, 09:41

View original

3 replies

Userlevel 5
Badge +10

Hi,

This error seems data related if the report works for other orders.  Our system is using the 3rd party reporting tool called ‘ActiveReports’ and there is a known issue with processing some complex reports.  We have encountered a similar issue in the past where the error occurs only for a certain order.  When investigated, the error is coming from the 3rd party tool.  I suggest you provide your database copy to your local support team and they may be able to find out which particular data is causing the issue or the issue may be eliminated by tweaking some report layouts.

Regards,

Susie

Userlevel 6
Badge +11

Thanks for your reply, Susie.

I solved this - here’s a reference for others:

I got an idea: I opened up the report in Customizer. It is possible to get the SQL select statement for the report from this module: 

 I ran the select in SQL Studio (you have to mod the where statement) against the non-functioning and a functioning sales order.

What I found is that the sales order missed the manadatory field Country from the BillTo-address - as this was not in the Countries table.

I update the Countries table and added the country code to the sales order, and now it works.

How they managed to add a sales order without all manadatory fields is a bit of a mystery, though

Userlevel 5
Badge +10

Glad to hear that you have worked it out.

Reply