Answer:
Usually a report is fetched from the database where data from all previous years is available. Once data is fetched, the raw data is compiled and formulated into appropriate report. The reason that report took longer is that user might have selected a date range from last two years until now which means that entire two years data was fetched from the database, operations were performed onto the raw data and the compiled data was then adjusted as per the report output.