Hi,
I've got data (from several tables) that is retrieved, loaded into a dataset, set as the datasource for UltraGridPrintDocument.Grid and displayed using the UltraPrintPreviewDialog. One field from one table in the data can be extremely long, and it can contain limited formatting ([CRLF], for example). Because of the formatting, I need to set the style of the column, and use an editorcomponent for the column. I've tried the display without doing this, and the text all appears, but [CRLF] formatting is stripped, leaving the data difficult to read. When I use the editor, the data maintains its limited formatting and is readable. The problem is that if the text is more than 32,490 characters long, none of it displays in the preview. The space is reserved for it (as in the preview may have multiple "blank" pages where that data should display), but the text is not visible.
Is this a known limitation/behavior? If so, can someone point me to the documentation for it? I looked, but I may have been looking in the wrong place.
Second, can anyone think of a way around this? (Currently, I am explicitly having to truncate the data at the limit, but because of what the data means to the reader, I'd prefer not to do that.)
Thanks,-amanda
Hi Amanda,
We have investigate this issue further and turns out that this is an issue with the Microsoft PrintPreview control itself.
Mike Saltzman has reported this as a bug to Microsoft. Here's a link to the report: https://connect.microsoft.com/VisualStudio/feedback/details/655767/printpreview-control-fails-to-display-if-you-attempt-to-draw-strings-with-length-greater-than-32490-characters#details
I have contacted you in your case for more details. Please let us know if you have any further questions.
Sincerely,DimiDeveloper Support Engineer, MCPD Infragistics, Inc.www.infragistics.com/support
I have logged this behavior as a development issue as number 65508 in our tracking system. I have also created a case (CAS-59986-SQMGTZ) for you in order to notify you when the fix another information is available.
Let me know if you have any further questions.
Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Thank you Dimi and Mike!
I just want to let you know that I am currently looking at your sample and I will get back to you when I investigate it more deeply and log it in our development system as a issue.
Thank you.
That's good to know. I've experienced a lot of odd behavior from the print preview's graphics in the past, so this is probably a bug in the PrintPreview class. But we will check it out and see if we can at least find a workaround.