Purchase Order status Report issue

Hi,

AP>>Reports>>Purchase orders>>purchase order status

I customized the report in test environment and moved that customization XPO in to production, When applying the ranges between (Fromdate, Todate) and i tested that report in test environment it’s showing correct data but when i run in production it showing different.

Please any one suggest

Test env report:

Production report:

Do you have the same data in both environments? It would be difficult to say what went wrong in your report(without knowing how you built it).
Please try to debug (or) run the similar query in a job to compare the results.

Yes kranthi same data in both environments, i debug the code also getting fromdate and todate.
but its showing wrong data in production.
Code:
public void processReport()
{
Query query;
QueryRun qr;
QueryBuildRange qbdRange;

POStatusContract contract = this.parmDataContract() as POStatusContract;

fromDate = contract.parmFromDate();
toDate = contract.parmToDate();
//Checking for null date
if (!fromDate)
{
fromDate = systemdateget();
}
//Checking for null date
if (!toDate)
{
toDate = systemdateget();
}
query = this.parmQuery();
qbdRange = query.dataSourceTable(tableNum(PurchTable)).addRange(fieldNum(PurchTable,CreatedDateTime));
qbdRange.value(SysQuery::range(fromDate, toDate));

qr = new QueryRun(query);

while (qr.next())
{
purchTable = qr.get(tablenum(PurchTable));
purchLine = qr.get(tableNum(PurchLine));
this.insertIntoTempTable(purchTable,purchLine);
}
}

If you can debug, then you should be able to see/analyse what does the query returns.

Hi kranthi Thanks for giving reply,

So are you not getting the values as per the query?

Thanx kranthi,
In test environment getting the values as per query, same as not getting production

Try to connect to each individual AOS’s to check the XPO has been refreshed and has the latest code. Refresh you Reports cache under tools. Then retry …

pastedimage1499104478438v1.png

Hi venkat chaitanya,
yes i have removed all caches… issue is not solved

As per your comments, your query is not returning the results that it has to return.
You should get the values from the query that is shown while debugging (from your last screen shot ).
Run the query via job in both environments and see the results.