We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Adding Rendering Extensions in Local Mode WinForms

I’m trying to add rendering extensions to my WinForms project running the Report Viewer in Local Mode. I’ve got 5 different types of reports (Invoices, Financial Statements, Standard, Project, and Custom). As such, I’ve got 5 separate forms with reportviewers.

I’ve got the AddExtension method as a global method, and I’m calling the method from the form load of each of the reporting forms.

On only 1 of the five forms do the extensions get added. The code to add the extensions is identical on all forms.

How do I get it to add the extensions on all forms containing the report viewer?

Additional note here…

Of the 5 screens two are working. The two that are working both happen to only have a reportviewer control and are shown in a modal window.

The three that are not working are mdi children windows being managed by an Infragistics control (UltraMDI…)


Hi,

Thank you for your inquiry. Well, you seem to have a special scenario. What comes to mind is

  • Do you have five separate ReportViewer instances and do you pass all of them to the AddExtensions method?
  • Don't you call the ReportViewer.Reset method somewhere?

Thanks.

"Do you have five separate ReportViewer instances and do you pass all of them to the AddExtensions method?"

Sort of. The two forms that are modal, get created each time a user launches them. However, the 3 non-modal forms are single instance using the My.Forms class. Since the 3 are mdi children, the idea is that if the form is already open, it just activates instead of re-creating it.

That said, on the three that are not working, they never work, not even after the first showing.

I assume that it’s fairly normal to have your control work in an MDI application with children forms, so I’m wondering if it has something to do with the Infragistics control. I say that with reservation, as I hope it doesn’t give you a quick way to say you can’t help.

Solving this will determine if I can purchase your product or not.

Clear, but could you please make sure (by setting a breakpoint) that AddExtensions is invoked when the MDI form is loaded or activated?

I missed your first note about calling reset. That is what I was doing. As long as a called the AddExtensions after the reset, it works fine.

Problem solved, thanks.

Glad to know that. I recently faced the same problem when writing code samples for the product and that's why I added that to the documentation:

Note calling the ReportViewer.Reset method will reset export formats to initial state, so if you need to use this method in your application, you have to add new export formats each time after the method is invoked.