Short Lesson: Converting Panorama 6 design sheet Equation field to Panorama X

When converting a database from Panorama 6 to Panorama X, in 99% of all cases the formulas in the design sheet Equation field transfer automatically, and are immediately ready to go. In a few cases manual adjustment is needed. I was just sent a customer file that did need adjustment, and I thought I’d give the entire community the benefit of a short lesson on this.

First of all, if the Panorama 6 database is using spreadsheet mode, the conversion will always work, no problems.

However, if the Panorama 6 database is using procedure mode, and it uses the feature where the last line in the Equation field is a procedure name, a minor adjustment is needed. It should take only a few seconds per field.

Here is part of the design sheet for the database I was sent. The arrows point to where the adjustments will be needed after the database is brought over to Panorama X.

Let’s start by looking at what Panorama does to the first of these equations, which does work. Since the Panorama 6 database was using procedure mode, the equation is transferred into the Code panel of the corresponding field in Panorama X. Since in this case the code is perfectly valid Panorama code, it works fine.

Some of the equations, however, are followed by the name of a procedure. Panorama 6 would automatically call the procedure after it evaluated the preceding formulas. In this example, Panorama 6 would first calculate the FICA value, then call the .FICA total procedure

Panorama X doesn’t understand when there is simply a procedure name stuck on the end – Panorama X requires that valid code be used, and this isn’t valid. So that means, instead of just a procedure name, you have to use a call statement. In most cases, all you have to do is type call and a space in front of the procedure name. In this case, since the procedure name contains punctuation, you also have to put quotes around the procedure name. Here is the fixed code.

(Also note that Panorama 6 would allow a colon as a separator between formulas, the colon needs to be removed for Panorama X, i changed it to a carriage return here, but a space will also work.)

Some of you may be wondering why Panorama made this change – why make a change that breaks even a small number of existing databases? In this case there is a big win enabled by this change – in the past you were limited to one or more formulas, and then a procedure name. Now you can put ANY code you want in there. For example, in this case you don’t really need a separate .FICA total procedure – you can simply put the necessary code right in the Code panel. Much simpler, and clearer, everything that happens when the field is modified is now all in one place, and your View Menu is less cluttered with little 2 or 3 line procedures that are only used in one place.

Another advantage is that you no longer have to remember any special rules. Any code that can be put into a procedure will work here. Once you’ve learned how to write code, you know how to use this feature with no additional learning.

This is obviously a payroll calculating spreadsheet. It will calculate total values as one TABS across after filling in the hourly wage and number of hours worked for the week. The Federal Tax is added manually however.

The problem is that There needs to be a TOTAL amount at the bottom of each column. For a Quarterly Federal Tax report we need the total for each column. We need the total social security paid, the total Medicare paid for each column over the three month period. How can this be done, a running total at the bottom of each column? The :.FICA is a command in Pan 6 that does this running total, it is not just a name.


A total for any column seems like a basic function to me. There needs to be a simple formula for this.


The Total command will put the total at the bottom of the column.

The aggregate( function can be used to calculate the total and put it into a variable.

Jim’s tutorial does the same thing you were doing in Panorama 6. It calls the “.FICA total” procedure, which then proceeds to do its thing. In your case that would be calculating the totals.

I put in “total” on a new line of the code areas. Now it crashes. But some columns do show a total. Check it out. Can I send in the file for others to see and play with?

I tested your file. It looks like the crash occurs when the Total command is in code that was triggered by the tab key. When it is triggered by the enter key, there is no crash.

I’ve posted your file on my Dropbox account for anyone else who would like to look at it. It can be downloaded from

This is a known issue, I think. I have some formulas that aren’t triggered by tabbing out of a field but are by entering. No crashes, though.

In this case, the Total command is the second of two statements in the code. When Total is commented out, the first statement runs without issue, even when it is triggered by the tab key. When the Total command is present, it crashes when it is triggered by tab.

I think the issue is that when the tab key is pressed, Panorama then jumps to another field. But you are running code that jumps to another field, fighting what Panorama is doing.

There is no Field command. It simply does an assignment, and then Total. If the tab key jumps before the code is executed, I would expect it to total the wrong field, but I wouldn’t expect it to crash.

That goes without saying, but I guess I should have said it anyway.

There is no Field command

I know that some of @aehaas code definitely has field commands in the code being executed when the field is exited, at least for some fields. I’m looking at one of his procedures that has 2 field commands right now. I didn’t actually test to see if that caused a crash.

Ok, I did test it right now, and that code is causing a crash when tab is used. But it is crashing in the total statement, so it may be that it crashes whether there is a field statement or not.

I added a new empty column (field) after the last “NET” column and TABBING does not cause a crash now.

I use the latest Mac OS and none of my PanX databases work correctly using Page Setup to enable fitting of the data onto single pages. I was told I have to make a report form, for each database. Really?? This needs to be fixed in my opinion.


I’m not sure if I quite understand your post, but the inability to set a print scaling value other than 100% is definitely a known issue that we already have filed on the bug tracking database.