Page 1 of 1

Printing Help!

PostPosted: Thu Mar 17, 2005 7:42 am
by woo
I got to the place were I can print all the record that I have found in my lay outs on the data base. But, the lay out with no found record still prints blank paper. This is the schrip I am using. What is wrong with it.

Set Error Capure(on)
If ["status (CurrentErro)<>0"]
End If

PostPosted: Thu Mar 17, 2005 7:44 am
by woo
Oh!
File maker 6 is what I am using.

PostPosted: Fri Mar 18, 2005 4:27 am
by John Sindelar
Set Error Capure(on)
If ["status (CurrentErro)<>0"]
End If


Your script would actually test for an error resulting from the Set Error Capture step, and that is unlikely to produce an error. =)

If you want to omit the layout with a found count of 0 test for:

Status (CurrentFoundCount) =0

Hope that helps,

John

PostPosted: Fri Mar 18, 2005 6:24 am
by woo
so I need to scrip like this?

Set Error captuer(0n)
If ["Status(CourrntFoundCount")=0
End if

PostPosted: Fri Mar 18, 2005 6:31 am
by John Sindelar
woo wrote:so I need to scrip like this?

Set Error captuer(0n)
If ["Status(CourrntFoundCount")=0
End if


No, I'd do something like this....

If ["Status(CourrntFoundCount")=0
ShowCustomDialog ( "There is nothing to print. I'm sorry")
Else
Print...
End if

If you're just looping through layouts and don't want to do anything when there are no records found, simply change this to...

If ["Status(CourrntFoundCount") > 0
Print...
End if

Hope that helps.

PostPosted: Mon Mar 21, 2005 7:22 pm
by woo
John.
Thanks it worked.