... I see. My form is browser-enabled and it has to stay that way. I notice
I can enable the "Print View" function on the form, but I don't want it to
show on every view of my form and when I click on it to print after data
entry, it keeps on messaging that you can't print until you click on the OK
to update. I don't have an ok button on the form. Is there anyway to
control this Print View function from programming code?
Much appreciation...
AD
> In InfoPath 2007, this would be the Print() method or this.Print() if you're
> using C# and Me.Print() if you're using VB.NET, but this method is not
[quoted text clipped - 14 lines]
> >
> > AD
S.Y.M. Wong-A-Ton - 17 Aug 2007 02:21 GMT
If you're referring to the "Print View" button on the toolbar of a form
running in Forms Services, you cannot get to it through code from within the
form itself, since it is driven by JavaScript and print functionality in a
component of Forms Server. I saw the OK you were referring to. That looks
like a bug to me. If you click OK and then click Print View again, it works.
It seems like it detects changes made on the form and somehow cannot print
without doing some update (a Postback to probably update the ViewState),
which it does when you click OK.
If you want to print a form from within the browser and not use the standard
print functionality offered by Forms Services, you will have host your forms
in your own ASP.NET page, add a button to your ASP.NET page, and write code
behind that button to print the form. I haven't yet found an easier way to do
it...
---
S.Y.M. Wong-A-Ton
> ... I see. My form is browser-enabled and it has to stay that way. I notice
> I can enable the "Print View" function on the form, but I don't want it to
[quoted text clipped - 25 lines]
> > >
> > > AD