I have a web-based infopath form with many validations rules added to the form. I need to disable printing function if the form contains any validation errors.
What I did was when the print view is loaded in web browser, I checked the count of this.Errors in the FormEvents_Loading. If the count is not 0, then I disabled the printing functions.
The problem is that the this.Errors.count is not 0 if the form is even the form does not contain any validation errors if the printing view form is not opened from a saved form. More specifically, createa a new form, fill it in so that there are no validation errors, save it, and then click Print Preview button, then the this.Errors.count is not 0 in side the the FormEvents_Loading. If I closed the form, reopen it and then click the Print Preview button, then this.Errors.count is 0 in side the the FormEvents_Loading.
So my question, how do I get the correct count of this.Errors without closing form and re-opening it? Any help would be greately appreciated.