Printing from flash

(in Flash Actionscript 3)
I have a datagrid with many rows (let’s say 200). I need to print the datagrid and have it span onto as many pages as needed.

I feel like I’m close. What I am doing at the moment is I get the total number of rows in the datagrid and knowing how many rows I want per page I do some math and get the number of pages and remaining rows. I then have a loop that runs that same number of times, it builds an array using my datagrid as the value for each item in the array. Each time the loop runs I use scrollToIndex to scroll the datagrid to the “next page” then add it to the array. I use another loop (that loops the same number of times) to add the datagrid to the sprite that I am using in my print job.

I am getting the right number of pages (let say 4 in this case) but all the pages are the same and they all show the results for the LAST page. They are all identical.

I thought that adding the datagrid to the the array would “capture” the grid just as it was when I added it, but I’m pretty sure that’s insane and I’m stupid. I have a very poor grasp of the entire print job and datagrid thing to begin with.

Does anyone have any ideas?
Thanks!
-Logan