Sales invoice report is not generating even though data are there

Hi Team,
Recently I have faced an issue on salesinvoice report.
it is a custom code added to both salesinvoiceDP and salesinvoiceDPBase class, which was working fine before adding my customization to it.
Actions taken by me:
I tried to change a datafield coming from one field to another.
localTmp.FSTransDate = custTrans.LastSettleDate;//custTrans.TransDate; (Priviously report was picking transdate but i changed to lastsettledate)
when i pick a sales order first time and click on print original, the report is getting printed but if i do the same for the second time onwards, even though data are there report is not getting printed. I reverted my changed and build it again but the report still came blank.
when i debugged it i came know that this piece of code(if (!this.useExistingReportData())) is not executing in the process report call. Cursor is coming always out of loop. so only it is not printing data in the report.

public void processReport()
if (!this.useExistingReportData())
tried solution:
thought it might me the usage data issue so
→ tired to clear usage data
→ restarted all necessary services.

i am not able to understand why it is coming out of loop , its a standard process.

any help would be appreciated.

Thanx in advance.

What exactly do you mean by “Cursor is coming always out of loop”? I don’t see any loop in the code.