Conditions and Layers

WARNING: Before making changes to ANY of your Basic Report templates it is advisable to take a backup.

This wiki page will demonstrate the use of Conditions with Layers.
Note: It is important to understand that a Sales Invoice report, Quotation report, Proforma report and Credit Note report all use the same Invoice Report Template.


If you wish information to be displayed on a certain type of report, for example only on a Quotation Report, conditions must be utilised. Conditions allow rules to be defined against objects and instruct Khaos Control on which objects to generate on a report.
It is often the case that information that is required to appear only on a certain document type is physically placed where existing information is currently set. For example, on a Proforma report you may wish to display payment acceptance details in the footer section of the report, whereas for a Quotation you may wish to display your terms and conditions for quotations in the footer section of the report.

Proforma footer example and Quotation footer example:

Proforma Footer 012345 Quotation Footer


In Report Builder Designer these 2 pieces of information would be inserted using the Memo object. Without the use of conditions or layers both objects would be visible on a Sales Invoice report, Quotation report, Proforma report and Credit Note report and would overlap each other.

This is how the above example will look in Report Builder Designer and on a Printed Report without conditions being set.

Report builder view Report print view

One way to ensure that the information is only present on the relevant report is to set a condition against each of the memo objects. From a design perspective this method can be untidy and difficult to manage. The better method is to use layers and then apply the correct condition to the layer.

Layers and Conditions

  1. Open your Invoice Report design in the Report Builder
  2. From the Report Tree, right click on Design Layers and select New Band Layer.
  3. Give the new layer an appropriate name.
    Tip: Use the main layer for your Sales Invoice reports and add a new layer for Quotation report, Proforma report and Credit Note report, as required.
  4. To work on a layer, activate it by selecting the correct layer tab:

New layer 012345 Layer Tab

You will now find that design area is a lot easier to work with. All new objects can still be snapped and aligned to objects set in other layers. This enables the user to ensure accurate placement of all objects.

Now we set the condition. Instead of the condition being set against the object, we will set it against the whole layer.

  1. Save and close the Report Design Builder to go back to the Basic Reports Setup dialog.
  2. Click on the BtnBasicReportsConditional.jpg button.
    Layer Conditions
  3. Select the add new item button,the NEW ITEM button has an icon that shows two sheets of paper (identified by having the top right corner folded down), arranged diagonally on the icon from top left to bottom right
  4. Enter the following details:
    • Report Component Name: Proforma (Name of the layer)
    • Type: Layer
    • Data Pipeline: DBBase. This must be selected using F4
    • Data Field: sovtype_id. This must selected using F4
    • Condition: =
    • Value: 1-2
      Notes: sovtype_id codes:
      • Sales_Invoice: 1-1
      • Proforma: 1-2
      • Credit Note: 2-1
      • Quotation: 3-1

The main benefits of using this method are:

  • Easier and cleaner to design.
  • Minimalizes the amount of different conditions that need to be set and managed.
  • Multiple objects can be effectively grouped together and managed within a layer.

Tips for common errors:

  • If the conditions that you have set are not taking effect, work through each condition one at a time, per report type.
  • Check for spelling. Conditions are case sensitive.
  • Ensure that the data pipeline and fields are set using the F4 function.
  • Ensure the checkbox 'visible' is ticked for each object.

Removing a condition

To remove a condition:

  1. Click on the BtnBasicReportsConditional.jpg button to open the set conditions in the Basic Reports Setup Dialog.
  2. Scroll over to the right to view the checkbox "Remove" .

    Remove checkbox
  3. Put a tick in the remove checkbox next to each condition you wish to remove.
  4. Click Ok.

See Also

Did you find this article helpful?