Print statement in a procedure or form appears to act as a stop


#1

Can somebody please try this:

openprocedure "insert a procedure name here"
print ""
message info("dialogtrigger")

I cannot get any statement to execute after the print statement within a procedure. Similarly, if I try to print a form. No problem if I try to print the data sheet of the active database or another database.

This problem exhibits on three differently configured computers.


#2

I am finding the same thing. I group up, open a form, print, and then it should remove the summaries and close the form, but it stops at Print.

It is not a problem with printtopdf, but that requires a lot more work to get the options I want.


#3

I can confirm it. I tried this one:

openprocedure ".AreaCoder"
print ""
openform "MapLetter"
message "I've just printed that procedure and opened the form."

After printing nothing happened. [Well, to be very accurate, the first time line 3 wasn’t there and I got an alert saying something like Dialog aborted, after which nothing happened. The second time I ran that one some sort of message box appeared for about a tenth of a second which I couldn’t read. Then I added line 3 and after printing finished, nothing.
I put the line

Pause""

after print and I then consistently got a flashing alert, but it didn’t open that form.

So there does seem to be some problem here.

(Once again replying from my mail program didn’t post here.)


#4

I’m so pleased that this is a genuine bug and not just an aberration on this side of the Date Line.

I’ve seen this all the time - I set up an extremely long message and it was easier to see that it was, in fact, that message which flashed on and off. My recollection is that it doesn’t appear if I hit the Cancel button.


#5

I can confirm it. I tried this one:

openprocedure “.AreaCoder”
print “”
openform “MapLetter”
message “I’ve just printed that procedure and opened the form.”

After printing nothing happened. [Well, to be very accurate, the first time line 3 wasn’t there and I got an alert saying something like Dialog aborted, after which nothing happened. The second time I ran that one some sort of message box appeared for about a tenth of a second which I couldn’t read. Then I added line 3 and after printing finished, nothing.
I put the line

Pause""

after print and I then consistently got a flashing alert, but it didn’t open that form.

So there does seem to be some problem here.

Michael Kellock

28 June2018 at 8:43 PM

michael

    June 29

Can somebody please try this:

openprocedure "insert a procedure name here" print "" message info("dialogtrigger")

I cannot get any statement to execute after the print statement within a procedure. Similarly, if I try to print a form. No problem if I try to print the data sheet of the active database or another database.

This problem exhibits on three differently configured computers.


Visit Topic or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.

logo

** William Conable***, Alexander Workshops, LLC*

Mobile: 509-270-7492
815 Villard St.
Cheney, WA 99004

www.alexanderworkshops.com

Designed with WiseStamp - Get yours


A procedure printing app
#6

I ran into the same problem, when I tried to run a procedure with a print command inside a loop. The loop stops at 1, even though it should have run through and printed 5 times.

Just confirming this issue.


#7

Sorry to say this may not be fixed for a long time (or possibly ever). I would suggest using the printtopdf statement, which despite the name has an option to print directly to a printer rather than to a PDF file. There’s no dialog, you have to specify the print options in the code, but I’ll bet in the case of @jcrunch with his 5 times loop he probably didn’t want 5 dialogs anyway!


#8

Is there some way to specify printer options with the printtopdf statement, like which paper tray to use?


#9

No, there is no way to specify options that are specific to a particular printer. Since not all printers have multiple trays, this is not included in Apple’s printing API (at least as far as I can tell).


#10

Multiple trays are just one option, and for me, it is not a problem, because my printer chooses according to page size, so I have been able to print letters and envelopes both in the same procedure.

There is probably some way of doing it through the CUPS interface.


#11

Is it feasible for you build a work-around in PX that uses printtopdf? It would have to have some default limitations but at least the print command would work.


#12

Got it to work with the printtopdf statement. Having some trouble getting group headers to print. Will investigate more on that one.


#13

Does this issue apply to the PRINT DIALOG variation of this statement as well?

And - does it apply to only printing procedures or does it apply across the board with forms too?

I’m hesitant to jump on a project after reading this thread - I have many files that use the Print Dialog statement…


#14

As I recall, it does.

I wonder if this issue is related to the Dialog Program Error bug.


#15

I just realized that one of my files has a procedure that uses Print Dialog twice, and that does not halt the procedure.


#16

Incidentally, this probably means it is an Apple bug: Print without the dialog does not have a return command, while Print with the dialog does. Has anyone tested this with Mojave? If it is not fixed, it should be reported as a bug.