Hello,
I'm using multiple EmbeddedVisualReportSections to print several controls. The problem is that the contents of e.g. a TextBox can get very large, so I'd like to wrap the lines and, if the vertical space is not enough, overflow on a second page. I can set the TextBox.TextWrapping property, however this only applies to the TextBox itself and not the way the Report renders them on a page. I could use the HorizontalPaginationMode property to scale the content down, but then the TextBox could be scaled down too much. How can I print such controls properly? Or if there are other/better suited solutions, I'd also be open to hear them.
I'm using Netadvantage 13.1 WPF
Thanks
Since the xamDataGrid implements IEmbeddedVisualPaginator which seems to make printing a bit more flexible, I use the TextBoxes' Text contents as a DataSource for a second xamDataGrid just for printing. This seems to work pretty well, however if one Text is longer than one page, it will just cut off after that page instead of spanning to another one. The HorizontalPaginationMode and PagePrintOrder properties don't seem to have an effect on this. How can I make the xamDataGrid span multiple (vertical) pages?
Thank you for your post. I have been looking into it and I can say that currently the best way to print a control on multiple pages is to implement IEmbeddedVisualPaginator Interface and write your own logic for printing. Here you can find more information about this interface:
http://help.infragistics.com/Help/Doc/WPF/2014.1/CLR4.0/html/InfragisticsWPF4.v14.1~Infragistics.Windows.Reporting.IEmbeddedVisualPaginator.html
Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
I've seen that as well, but it seems to be a lot of work for a relatively small issue. As I already mentioned, isn't it possible to put the text into a new xamDataGrid, and let that handle the pagination stuff over multiple pages?
Hello again,
The pagination in the XamDataGrid is based on the Records, so if you have just one Cell with a very long wrapped text it won't be spread along multiple pages either. The best approach seems to be the implementation of the IEmbeddedVisualPaginator interface.
that was a good hint! My text string can be easily splitted by newlines, so I just split it into a string array and set that as the data source for the xamGrid. Now it can be correctly spread over multiple pages. I realize that this isn't a perfect solution and probably abuses the xamGrid for something it isn't meant to, but the use case for my needs is so specific that the solution by splitting the string is sufficient.
Thanks!
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.