on a form, I have a
private UltraGridDocumentExporter ultraGridDocumentExporter;
and a button to initiate a pdf export. in the button click there is
Report report = new Report()
ISection section = report.AddSection(); ISectionHeader header = section.AddHeader(); header.Height = 30; IText headerText = header.AddText(0, 0); headerText.Style.Font.Underline = true; headerText.AddContent(exportHeaderText); IText headerDate = header.AddText(0, 0); headerDate.AddDateTime("dd.MM.yyyy"); headerDate.Alignment = TextAlignment.Right; ISectionFooter footer = section.AddFooter(); footer.Height = 30; IText footerText = footer.AddText(0, 0); footerText.AddPageNumber(PageNumberFormat.Decimal); footerText.Alignment = TextAlignment.Right; ultraGridDocumentExporter = new UltraGridDocumentExporter(); ultraGridDocumentExporter.ExportEnded += ultraGridDocumentExporter_ExportEnded; ultraGridDocumentExporter.TargetPaperOrientation = PageOrientation.Landscape;
ultraGridDocumentExporter.ExportAsync(ug_report, section);
when I click the pdf-button, the event is executing the the report is collection some data. Now I click Cancel and close the form.
If I now reenter the form (which was closed, also disposed), and do the same (fill a grid, click on pdf button),
I get an argument exception "invalid parameter" in the line
ug_report is the grid, section the ISection.
What version are you using? This sounds like a bug that was fixed. So you probably just need to get the latest service release.
How to get the latest service release - Windows Forms - Service Releases
If that does not help, then can you post a small sample project demonstrating the exception so we can check it out?
I use already the latest version 14.1.20141.1000
I also found the old forum entries regarding argumentexception, but the problem never was solved.
And I think no one there called the exporter a second time (but all new instanced, from form to exporter)
Also tried ultragriddocumentexporter.dispose, =null, GC.Collect on form.Close(), but no effect. The next time I create a new reporting form and click my button for pdf export, I get the error
Hello,
I was able to reproduce this with the ArgumentException with the code that you provided and I have logged this behavior in our internal tracking system with a Development ID of 171752. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution. I will post the resolution on this thread after development has resolved this.
Let me know if you have any questions.
The fix for development issue 171752 is in the latest service release and can be downloaded from the Keys and Downloads page.
can confirm the problem is gone now (Infragistics_WinForms_20141.2035_SR)