How to create a report when a process of unknown duration finishes?

This is a two-part question, one on triggering a report and the other on how to grab just the data I need. I've been asked to setup a historical trend on a report that starts when the process starts and ends when the process ends. I then need to trigger it to print or save when the process ends. I could use some help figuring out how to trigger the report when the process ends. I have a simple bit in the PLC that's high when the process is running and low when the process isn't running. I see I can also use this bit to trigger a transaction group to start and stop, my only problem is then how do I query just that timeframe of data? I've triggered that bit several times and all I have is one big table with jumps in the date range (t_stamp), and I could also add this bit as a pointer in the data but again it's just one big table. Let's say the process ran yesterday am, then yesterday pm, then today am, all at random times. How would I print a report of just today's data if the start times and end times are completely variable? Is this even possible? I know by hand I could do it by just manipulating a historical trend and then printing it out when I'm done but is there a way to automate this. Any help would be great.

Can you create a ring buffer in the PLC which stores relevant data for the last ## processes? Include start time, end time, and any other summaries for that 'batch'. You can then read the most-recent index to generate a report for the most-recent process (or read entire array to generate reports / summaries for last ## processes).