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.
can confirm the problem is gone now (Infragistics_WinForms_20141.2035_SR)
Hello,
The fix for development issue 171752 is in the latest service release and can be downloaded from the Keys and Downloads page.
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.
Hi,
I tried this out using the same code you posted here and it works fine for me. I'm attaching my sample project here so you can try it for yourself. Run the sample, and push the export button. Hit Cancel. Then push Export again.
This works fine for me and I get no errors.
If you get an exception with my sample, then the problem must be with the version of the controls you are using on your machine. If my sample works on your machine without any errors, then something else in your application is causing the exception. In the latter case, we will need a sample demonstrating the problem in order to assist you further. :)
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