Print Layout Selection Single Dialogs Workspace

Use this workspace to set up rules that determine which layouts Maconomy uses for which reports, depending on specific circumstances.

For example, you can designate one layout for invoices for domestic customers and another layout for international customers. Each rule can include multiple selection criteria.

In this workspace, you can create a number of layout selection rules, each of which is related to a database table and a printout. In a layout selection rule, you also specify the layout to be used when the printout of an item in the selected table matches the criteria for the layout selection rule in question.

You define the criteria for the use of a given layout selection rule on one or more lines in the Layout Selection Rules sub-tab. On each line, you can specify a field from the table that is displayed in the Print Layout Selection tab and a criterion for the value in this field. This means that for each item printed, Maconomy checks the value in the field in question. If the value is within the range specified on the layout selection line, it matches the criterion. You can also specify a layout as a criterion. If you do that, the criterion on the line is a match if a user selects the specified layout before starting the printout. A layout selection line can also consist of a combination of field values and a layout.

You can set up any number of lines, and the lines can either contain criteria for the same field or several different fields. However, if the same print layout selection rule contains several lines that have criteria that relate to the same field, an entry that is being printed only has to match one of the lines for the print layout selection rule in the tab to be activated. If there are several criteria lines that relate to different fields, an entry that is being printed must match at least one criterion line for each field for the print layout selection rule in the tab to be activated.

This functionality can be illustrated using an example where the following criteria lines have been set up for a print layout selection rule:

Language

English

Language

French

Currency

GBP

Currency

USD

Currency

CHF

In this example, the print layout selection rule is activated for entries where the language is either English or French and where the currency is USD, GBP, or CHF. For example, the print layout selection rule is thus activated by an entry with English language and the currency USD, or an entry with English language and the currency GBP, but not by an entry with English language and the currency DEM.

You can set up any number of print layout selection rules for the same combination of printout and datagase table, allowing you to create a print layout selection rule for each layout that you created for the printout in question. The print layout selection rules that have the same combination of printout and table can have overlapping criteria in the Layout Selection Rules sub-tab. You can therefore enter a priority for each print layout selection rule. When you print an item, Maconomy checks whether the item matches the criteria of several print layout selection rules that have the relevant combination of printout and table. If it does, Maconomy uses the print layout selection rule that has the lowest priority number.

If the item does not match the criteria for any of the print layout selection rules, Maconomy uses the layout that you selected before you started the printout.

It is important to note that you cannot mix MPL 2 (or MPL 1) and MPL 3 layouts when you create layout selection rules. If the first layout that you select is an MPL 2 (or 1) layout, and at any later point you select an MPL 3 layout, the server will crash with a PPU Debug string with the message "OpenPrintsDefs: PrintsDefsVersion 'xxxxxxxx' too new." If the first layout that you select is an MPL 3 layout, and at any later point you select an MPL 2 (or 1) layout, the Maconomy client will show an error message that explains that you cannot mix MPL 1/2 and MPL 3 layouts. It is therefore quite important to verify that this cannot happen when you set up the layout selection rules. Also, when you update a single layout that participates in layout selection rules you must update all of the layouts that participate in the same rules.

In addition, note that although the Printer Selection workspace allows you to specify that Maconomy is to use a given printer if you select a certain layout, the print layout selections in this workspace have no influence on the printer used in that printout. This is because the printer selection is done from the layout that you select before you start the printout (or the layout that Maconomy uses automatically in the case of printouts from functions), and not the layout that is ultimately used for the individual item.