PDF EXPORT System.ArgumentOutOfRangeException
When I export it to pdf, I get this error.
Please explain solution for this problem.
Report report = new Report();
report.LoadPrepared((System.IO.Stream)dpOutput["@REPORT"].data);
FastReport.Export.Pdf.PDFExport pdf = new FastReport.Export.Pdf.PDFExport();
report.Export(pdf, "c:\\return.pdf");
System.ArgumentOutOfRangeException: ì¸ë±ìŠ¤ê°€ 범위를 벗어났습니다. ì¸ë±ìŠ¤ëŠ” ìŒìˆ˜ê°€ 아니어야 하며 ì»¬ë ‰ì…˜ì˜ í¬ê¸°ë³´ë‹¤ 작아야 합니다.
매개 변수 ì´ë¦„: index
위치: System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
위치: System.ThrowHelper.ThrowArgumentOutOfRangeException()
위치: System.Collections.Generic.List`1.set_Item(Int32 index, T value)
위치: FastReport.Export.Pdf.PDFExport.WriteFont(ExportTTFFont pdfFont)
위치: FastReport.Export.Pdf.PDFExport.AddPDFFooter()
위치: FastReport.Export.Pdf.PDFExport.Finish()
위치: FastReport.Export.ExportBase.Export(Report report, Stream stream)
위치: FastReport.Export.ExportBase.Export(Report report, String fileName)
위치: FastReport.Export.ExportBase.Export(Report report)
위치: FastReport.Preview.PreviewControl.Export_Click(Object sender, EventArgs e)
Please explain solution for this problem.
Report report = new Report();
report.LoadPrepared((System.IO.Stream)dpOutput["@REPORT"].data);
FastReport.Export.Pdf.PDFExport pdf = new FastReport.Export.Pdf.PDFExport();
report.Export(pdf, "c:\\return.pdf");
System.ArgumentOutOfRangeException: ì¸ë±ìŠ¤ê°€ 범위를 벗어났습니다. ì¸ë±ìŠ¤ëŠ” ìŒìˆ˜ê°€ 아니어야 하며 ì»¬ë ‰ì…˜ì˜ í¬ê¸°ë³´ë‹¤ 작아야 합니다.
매개 변수 ì´ë¦„: index
위치: System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
위치: System.ThrowHelper.ThrowArgumentOutOfRangeException()
위치: System.Collections.Generic.List`1.set_Item(Int32 index, T value)
위치: FastReport.Export.Pdf.PDFExport.WriteFont(ExportTTFFont pdfFont)
위치: FastReport.Export.Pdf.PDFExport.AddPDFFooter()
위치: FastReport.Export.Pdf.PDFExport.Finish()
위치: FastReport.Export.ExportBase.Export(Report report, Stream stream)
위치: FastReport.Export.ExportBase.Export(Report report, String fileName)
위치: FastReport.Export.ExportBase.Export(Report report)
위치: FastReport.Preview.PreviewControl.Export_Click(Object sender, EventArgs e)
Comments
The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method. Indexing an empty list will always throw an exception. Use a method like Add to append the item to the end of the list, or Insert to place the item in the middle of the list somewhere, etc. You cannot index into a C# list if that offset doesn't exist.
Typically, an ArgumentOutOfRangeException results from developer error. Instead of handling the exception in a try/catch block, you should eliminate the cause of the exception or, if the argument is returned by a method call or input by the user before being passed to the method that throws the exception, you should validate arguments before passing them to the method.