David Pokluda
2/16/2006 6:17:00 PM
I am not familiar with this area. I would try the following:
Create a method containing code for printing the report.
In your Ok button start the method in a different "thread" (I know it is not
multi-threaded in fact):
lines = infolog.line(); // can simplify your infolog checking in your
custom method -- requires int class variable named lines
infolog.addTimeOut(this, 'yourMethod', 2000);
In case of an error I would expect something (error message in infolog).
Therefore in your method you can check whether there is new error message in
the infolog. If there is then cancel the print.
I don't know if this works for you but I would at least give it a try.
Regards,
David.
"Raj" <Raj@discussions.microsoft.com> wrote in message
news:A4E28923-0DC7-4C24-AA8D-082805B9177A@microsoft.com...
> Hi ,
> I have to send the report to the printer on click of ok button in
> prodparmstatusdecrease form , i need some help regarding where should i
> call
> the code to print the report b'cos if i call this in click event of the
> form
> , what happens is
> it ignores the error message and report is printed, i want the report to
> be
> printed only if there is no error message ,
>
> how to achieve this . Do any one have code to call the report from a form
> which takes the selected row value as parameter to the report.
>
> I want the code for both report and the form.
>
> thanks in advance
>
> rr