Procedure Coding

What Panorama X statement replaces the Print Dialog statement from Panorama 6 in procedure code.
I’m printing within a loop and need to review each page before it prints.

What do you mean with “review each page before it prints”? Are you just referring to the thumbnail overview in the Print dialog itself, or do you open a preview PDF in Preview.app for each loop?

You could use the preview statement in your code to display a page in Preview.app, too.

The most versatile print statement in Panorama X is printtopdf, and — in spite of its name — it is able to print to printers, too. Read all about its options in the Panorama X Help.

Is this a trick question? :thinking:

Panorama X has the exact same

print dialog

statement that Panorama 6 had, and it works the same way.

Like Kurt, I don’t know what you mean by “review each page before printing”. If you mean the thumbnails in the print dialog, yes, you can do that using the print dialog statement.

I should have taken a closer look at the documentation of the print statement. I correct my previous post.

Not a trick question. When I replaced the printtopdf statement with print dialog on a procedure which was working fine, I got a OK on the check procedure, and when the procedure to to the print dialog statement it indeed stopped for me to decide whether to continue with the printer. I clicked PRINT and it printed the current record on the form, but the 2nd time through the loop I got this error message:

So I assumed the Print Dialog was the problem.

There seems to be a bug with the print statement. It is stopping your loop. In a different thread Jim Rea wrote:

Basically, Panorama X stops running the procedure after the print statement. Fortunately, printtopdf can do the same job better, so it’s not a big problem.

But I think it is not a problem with Print Preview, only with Print “”.

So essentially what you are saying is that “printtopdf” is an equivalent to “print” within a loop, but there is no equivalent to the “Print Dialog” statement which can be used in a loop. I will just direct my team to run the loop for no more than 2 times to check to make sure it will print the way we need before they use the loop to print the forms the 50 to 100 times we need each week.
Thanks all for taking the time to respond.

I think I was wrong when I wrote it. The code does continue after the print dialog. The problem seems to occur when the print dialog is used twice in the same procedure.

I thought this problem had already been added to the issue tracker, but I couldn’t find it, so I have added it now.

What is the syntax for print preview? I tried “print preview” just by itself. The loop ran once and stopped. No error message.

I meant Print Dialog. Sorry about that.

I use Print Dialog twice in a procedure, printing two separate forms, with no problem.