Hi all,
Until now I had no problem with creating a PDF from an UltraGrid
But lately, and for no apparent reason, since nothing was changed in the dev environment, under certain conditios (number of lines, I guess) I get the following exception
The max number of lines in the grid is 2900 rows by 10 columns.
Again, this is a new error, since until now the code was working OK...my env is VS 2008 Pro.
Infragistics2.Win.v8.2 Versión del ensamblado: 8.2.20082.2022 Versión Win32: 8.2.20082.2022 Código base: file:///C:/Windows/assembly/GAC_MSIL/Infragistics2.Win.v8.2/8.2.20082.2022__7dd5c3163f2cd0cb/Infragistics2.Win.v8.2.dll----------------------------------------Infragistics2.Shared.v8.2 Versión del ensamblado: 8.2.20082.2022 Versión Win32: 8.2.20082.2022 Código base: file:///C:/Windows/assembly/GAC_MSIL/Infragistics2.Shared.v8.2/8.2.20082.2022__7dd5c3163f2cd0cb/Infragistics2.Shared.v8.2.dll----------------------------------------Infragistics2.Win.UltraWinTabbedMdi.v8.2 Versión del ensamblado: 8.2.20082.2022 Versión Win32: 8.2.20082.2022 Código base: file:///C:/Windows/assembly/GAC_MSIL/Infragistics2.Win.UltraWinTabbedMdi.v8.2/8.2.20082.2022__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinTabbedMdi.v8.2.dll
System.OutOfMemoryException: Se produjo una excepción de tipo 'System.OutOfMemoryException'. en Infragistics.Documents.TTF.Font.GetDataUnsafe(Font font) en Infragistics.Documents.TTF.Font.GetData(Font font) en Infragistics.Documents.Graphics.Font.ToStream() en Infragistics.Documents.PDF.PdfDocument.GetFont(Font font, Boolean embed, Boolean subset) en Infragistics.Documents.PDF.PdfPage.GetFont(Font font, Boolean embed, Boolean subset) en Infragistics.Documents.PDF.PdfGraphics.set_Font(Font value) en Infragistics.Documents.Report.Projection.Text.TextComposition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Tree.NodeComposition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Tree.NodeComposition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.Composition.Draw(IGraphics graphics) en Infragistics.Documents.Report.Projection.ProjectionPage.Draw(IGraphics graphics) en Infragistics.Documents.Report.Report.Publish(Stream stream, FileFormat format) en Infragistics.Documents.Report.Report.Publish(String fileName, FileFormat format)
Thanks in advance!
Gus
It's also important to note, that the current rows total is 700, not 2900 as stated before...
On the other hand, this exception is raised on a random basis...
My dev machine has 4Gb, running Vista.
I really need any help to sort this out...
Thanks!
Hi there,
I'm still fighting this issue, since it's affecting every other report.
So far, I'd noticed that:
1) The exporting goes well if the report is empty (no sections, no nothing), just the grid's data.
2) Also if the number of rows is reduced.
This is what I'm doing and worked until now...
Any help is appreciated, so far no answers as how to deal with this very NASTY issue.
Thanks in advance.
Dim prtdoc As New System.Drawing.Printing.PrintDocument Dim strDefaultPrinter As String = prtdoc.PrinterSettings.PrinterName Dim Test_Print_Dialog As System.Windows.Forms.PrintDialog = New PrintDialog() Dim Report_Module As Report = New Report() Dim Section_Module As Infragistics.Documents.Report.Section.ISection = Report_Module.AddSection() Dim ReportName_Test_PDF As String = App_Path + "\Reports\Testing_Test_Results_1.pdf" Dim ReportName_Test_XPS As String = App_Path + "\Reports\Testing_Test_Results_1.xps" Dim ReportName_Test_XLS As String = App_Path + "\Reports\Testing_Test_Results_1.xls" Dim UGDE As New Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter
Me.Create_Report_Test_R1(Report_Module, Section_Module) UGDE.Export(Me.UltraGrid_Results_1, Section_Module)
Try Cursor.Current = Cursors.WaitCursor Select Case e.Tool.Key Case "Print" If Test_Print_Dialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then Report_Module.Print(strDefaultPrinter) End If Case "XPS" Report_Module.Publish(ReportName_Test_XPS, Infragistics.Documents.Report.FileFormat.XPS) System.Diagnostics.Process.Start(ReportName_Test_XPS) Case "Excel" UGEE.Export(Me.UltraGrid_Results_1, ReportName_Test_XLS) System.Diagnostics.Process.Start(ReportName_Test_XLS) Case "PDF" Report_Module.Publish(ReportName_Test_PDF, Infragistics.Documents.Report.FileFormat.PDF) System.Diagnostics.Process.Start(ReportName_Test_PDF) End Select Catch ex As System.IO.IOException MessageBox.Show(msg32, msg_app_name, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) Finally Cursor.Current = Cursors.Default End Try