The virtues of printonemultiple

In converting my major factory working file to Panorama X, the majority of the 90 procedures did not compile. Following days of modification in hundreds of places altogether, I’ve been able to compile all but a handfull and I’ve learned a great deal about Panorama X. Even though I joined the course last year, this has been my first real opportunity to actually work with X as until now I had thought it was still too early in its development for it to handle my major working files in everyday use. In some ways it’s been a gratifying experience as many of the new features are just fantastic, and I’m looking forward to being able to use it every day.

I have found just one missing statement which is essential for us, printonemultiple. Still on Jim’s unimplemented list, this powerful statement is used by several of our procedures to print labels for use in our factories. One example is shipping labels for product outer packs: each contains a unique SSCC barcode, printed 4-up on A4 labels, and we print several hundred most days in each of our factories. We also use it to print various labels up to as many as 70 per A4 sheet.

Printonemultiple does not seem to have been mentioned in any of the likely places, Slack, Bitbucket or this forum, so I guess it is not commonly used. I’ve reviewed every statement and function I can think of, but I cannot come up with a workaround for this one.

Printonemultiple is a built-in statement in 6, so its code is not accessible in _PanoramaLib (as was one of the unimplemented statements I was using, which I duly kidnapped).

Unless there is a workaround I haven’t had the wit to see (always a distinct possibility), until printonemultiple is available in Panorama X I will have to keep using Panorama 6.

David Duncan

I have never used the printonemultiple statement, but couldn’t you write a loop that would do the same thing?

I’ve just realised that, while printonemultiple is used in the same procedure as the one that prints the SSCC labels I described, it is not actually used to print these labels, but a different label that prints only one label per A4 sheet and never prints more than four labels at a time. So I can easily do what Tom suggests and print a page at a time in a loop. Thanks, Tom!

The other barcodes I referred to are not printed in the factories but in head office in a stand-alone database and I can simply keep doing them with P6 if necessary.

I’d like to think that my confusion over this is possibly due to my long periods at the keyboard this week.

David Duncan

Since I now know that at least one person is using printonemultiple, I have bumped it up a bit on the priority list. I especially like the nice way you brought it up :slight_smile:

Note to self: It appears that the guts of printonemultiple would need to be implemented in the firstPrintRecord: and nextPrintRecord: methods in PrintFormView.m.

code is not accessible in _PanoramaLib (as was one of the unimplemented statements I was using, which I duly kidnapped).

What statement in _PanoramaLib did you need? I don’t see an obvious candidate for something that is both unimplemented and yet easily “kidnapped”.

I wondered about that too. It was only the delay statement, consisting of a couple of lines. I haven’t actually tested that it runs as expected, but I was able to compile it as well as the procedure that calls it (using callwithin!), which was my immediate goal.

I’ve only one uncompiled procedure left to sort out. Next step is the forms, which number about 50. Most require tweaking, and some of them surgery (e.g., popup menus with submenus). Following that I’ll start running the procedures to find the real-world uglies.

Thanks for moving printonemultiple up the list.

David

I’ll second that. I use it a lot in Pan 6 for printing matrices and assume I’ll continue to need it.

Aha, that explains my puzzlement, as that is in _UtilityLib, not PanoramaLib.

FYI, I just completed the PrintOneMultiple statement, so it will be available when the next release comes out (which should be fairly soon).

Without any claim that the below code is correct or should work, I do not believe it should crash Panorama but it does.

PrintOneMultiple Variable,1,2,1,10
PrintOneRecord dialog

Works perfectly for me. Here’s the result, I use the print dialog to save to pdf.

I used your exact code except I changed the variable name to reportIndex. Here’s the form I created.

It does print but then Panorama immediately crashes. I’m imagining that you’ll see about 3 crashes about 1pm today.

If the crash happens after printing it has nothing to do with the printonemultiple statement. I did not experience a crash.

Two crashes reported from you at about 1:15 PM. The crash report does not seem to indicate a problem with printing. Here is the detail view of one of these crashes. Note that the second column does not mention Panorama. None of this code is in Panorama, it’s all Apple code. The crash report does not contain any Panorama code at all, only Apple code.

Recently there have been a few crashes most weeks with this signature. They all mention NSSplitView, and no Panorama code is involved. So at the moment that leaves me with no clue as to the source of the problem, which seems to have started abruptly in mid to late December.