We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Dynamic Dataset Columns - need to print on multiple pages

Hello Aspose Team,

I have an issue I’ve been struggling with and can’t seem to find a solution for. I have a dataset that I’m importing into a table using table.ImportDataTable. This dataset has a dynamic number of columns. My page setup is landscape and paper is legal, which is the maximum size my clients can print.

I try to make the columns as thin as possible and I run through the columns to find & set the minimum width. But the issue is that sometimes there are too many columns to fit on one page and I would like the columns that don’t fit to be printed on another page, like Excel does. The behavior I’m getting is that the columns just run off the edge of the paper (in print preview).

Here is a sample. Do you have any suggestions for a clean/efficient way to dynamically deal with this?



Hi Terry,

Thank you for considering Aspose.

We can't support this in short time. You have to calculate the width of the table and add new table if needed.

Do you have any examples of code for this?

Does that mean I can't use ImportDataTable?

Maybe if there was a way to select a start and end datatable column, and start & end datarow it would be easy to put the data from a datatable into multiple pdf tables.

I hope we can support this feature automatically in next month. As a workaround, you can use ImportDataTable() As you can see the begin and end of row and column can be set.

I've tried using that method and the start and end rows to import seem to work. But I was unable to specify which dataset columns to imort. The other parameters appear not to control the dataset columns to import, but to control which pdf table columns to place the imported dataset column.

I have no good idea before we can support this feature. You can consider putting the data into string array and then import the array into table so you can control the table column number and the string array.

We have supported this feature in hotfix 3.2.2.

Great, I’ll check it out.