01-04-2011 05:48 PM
Sup guys,
I am trying to do a multi-page table in a pdf report. My table consists of a 2d array of strings but when it gets to be over 30 rows I need to put the excess on another page. I thought it would work to add a dimenson to the array for each page that way I could feed the paged table to a for loop in which I'd pdf the table and newpage for each page of 30 rows except for the last page that would have the remainder. The problem is that adding the 3rd dim to the array automatically fills the last page remainder with default data so that i get 30 rows even though the remainder is less than that. How can I fix this empty row problem? Is there a better approach?
01-04-2011 10:50 PM
You can't. Because you are converting the 2-D array to a 3-D array, each page of the 3-D array has to be the same size.
Depending on how you need to use the 3-D array later on, you might be able to have a 1-D array of clusters. Where the cluster contains a single item that is a 2-D string array. That way each 2-D array can be a page, and the array of clusters would allow you to have different sizes of 2-D arrays in each cluster.
01-05-2011 01:45 AM - edited 01-05-2011 01:48 AM
dd
01-05-2011 01:58 AM
Hi Viper,
You should do what Ravens has suggested. Build an array of clusters, each cluster containing a 2d array that can be displayed on a page. I have attached an example, simplifying some or your original code:
The last for loop is meant to simulate your pdf for loop. You just need to unbundle the array and then feed it into your pdf vi. You can adjust the amount of rows on a page by using the 'Rows per Page' Control.
Hope this helps,
Regards,
Lucither