How to make a double-column report tile?

I have a form currently set up like this:

and it produces a report like this:

08%20pm

What I want is for all of the tag pairs belonging to each mob name to be in a double-column layout like this (ignore duplicates - they’re just for display):

55%20pm

This was dead easy in Panorama 6.0 is it possible in Panorama X?

In the Multiple Column Labels/Reports section of the Form Properties panel you can set the number of columns. Have you tried that?

I think you are ascribing mythical powers to Panorama 6 that it doesn’t actually have. I don’t know of any way to format a report that way in any version of Panorama. This would be a pretty difficult format to generate – I’m pretty sure I would remember if I had ever designed an algorithm that would do that.

I did try one experiment right now (using across instead of down), but it didn’t work (as I suspected, it doesn’t print headers at all in across mode, which is really only for labels). I didn’t really think it would, but I wanted to double check before pronouncing publicly that it couldn’t be done.

Michael,

I can generate a report like this:

with the following code. My test database has three columns, Group, A, and B.

let lvgroups=""
let lvreportsegment=""
let lvpart=""
let lvfinalreport=""

selectall //replace with whatever you want to select for the report

lvgroups=arraydeduplicate(arrayselectedbuild(cr(), "", {Group}),cr()) //Builds an array for each heading in the report

looparray lvgroups, cr(), lvpart

/* This loop will create a segment of the report for each heading, then add it to the report. So the final report is built up with a new segment each time through the loop. */

    select Group=lvpart //you may need to adjust this selection depending on what you want in the report

    lvreportsegment=arrayselectedbuild(cr(),"",{tab()+A+tab()+B}) //Gets the data for each segment in a single column

    lvreportsegment=arrayfilter(lvreportsegment,cr(),{import()+?(seq() mod 2≠0,tab(),"")})  
    lvreportsegment=replace(lvreportsegment,tab()+cr(),tab()) //These two lines Replaces the 1st, 3rd, 5th, etc. carriage returns with a tab, so you get two columns (each column has two tab-separated elements)

    lvreportsegment=Group+cr()+cr()+lvreportsegment //add the Group to the report segment

    lvfinalreport=lvfinalreport+lvreportsegment+cr()+cr() //add the segment to the final report

endloop

displaydata lvfinalreport

You could combine some of these lines, but I left them separate to make to make it easier to follow what I did.

Pan6 had a word processor built in. Jim posted somewhere here that ProVue had licensed that code from a 3rd party, which since went out of business. Thus that feature won’t be coming to PanX. Might you have accomplished this then using that? In which case it wasn’t Jim’s code so he wouldn’t recall designing it!

I’m not expert with PanX’s report features, but a literally “outside the box” option would be to generate your report as a text file then export it to a suitable word processor for multicolumn layout. That conceivably could be automated via PanX coded AppleScripts.

No, the word processor only dealt with one record at a time. You couldn’t control layout of multiple records like this.

If it was generated as a text file, there would be no formatting information in the text. So you would have to manually edit the layout in the word processor. Maybe this could be scripted if there is a word processor that is fully scriptable. Heck, at that level, you could write a Panorama program to create a custom form with just the layout needed. But any of these would be super hard.

One possible option would be to generate HTML with the correct layout, then print using a browser. Still not easy, but probably easier than trying to use a word processor.

Most of the formatting functions available in the Pan 6 word Processor can be duplicated using the Panorama X Text Display Object and rich text.

Thanks to all for your contributions - Tom Cooper’s code looks good and saves writing my own :slight_smile:

Re the supplementary discussion on word processors, I’ve achieved some remarkable results over the years exporting data to Excel and programming Excel to format it. I’ve done a little of the same with MS Word and it’s not too hard, using Visual Basic’s excellent macro recording feature.