C# how to not make a table a fix height, as the Data for each PDF will be different

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v11)  /  C# how to not make a table a fix height, as the Data for each PDF will be different

DynamicPDF CoreSuite for .NET (v11) Forum

I have a report that will create a table will sometimes display a table with a few lines or with multiple lines, or will not have any lines and will not display the table at all.... is there a way to achieve this?

I am getting some overlapping as I can get the table to auto shrink or auto expand with the data displayed.
Posted by a ceTe Software moderator
Hi,

If you are using the Table2 page element, then you will need to set the required height before adding it to a Page object. 

It is suggested to build complete table and check the required height to fit the contents using GetRequiredHeight method and decide on adding other contents in proper position by calculating Y position accordingly.

Also please note that you can handle the table overflow dynamically. Please refer to the documentation on table continuation here.

If you continue facing an issue, then please send over the following information to support@dynamicpdf.com so we can look into it further.

1. Simple code sample which uses static data to recreate the behavior.
2. Output PDF.
3. Exact version and build number of DynamicPDF Core Suite DLL file used in your application. You can find this information by right clicking on the DLL file>>Properties>>Details tab>>Product version. Take a screenshot of Details tab and send it over to us.

Thanks,
ceTe Software Support Team
is there another option?
I want to display a datable from SQL... and I dont think that table2 element is going to work for me. As the Datable will not be always 4 rows, for 40 rows.
Posted by a ceTe Software moderator
Hello,

If you are using a Table2 page element, then you will need to set the required height to it before adding it to Page object. 

It is suggested to build the complete table and check the required height using GetRequiredHeight method and decide on adding other contents in proper position by calculating Y position accordingly.

Also please note that you can handle the table overflow dynamically. Please refer to the documentation on table continuation here:

https://www.dynamicpdf.com/docs/dotnet/dynamic-pdf-table-continuation

If you continue facing an issue, then please send over the following information to support@dynamicpdf.com so we can look into it further.

1.Simple code sample which uses static data to recreate the behavior.
2.Output PDF.
3.Exact version and build number of DynamicPDF Core Suite DLL file used in your application. You can find this information by right clicking on the DLL file>>Properties>>Details tab>>Product version. Take a screenshot of Details tab and send it over to us.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 9:43 AM.