Language:

HansaManuals

Creating a Report Using the Report Generator
Creating a Report Generator Report - Specifying the Primary Register
Creating a Report Generator Report - The Appearance of the Report
Creating a Report Generator Report - Choosing a Print Destination
Creating a Report Generator Report - The Width of the Report Window
Creating a Report Generator Report - Printing the Report
Creating a Report Generator Report - Adding White Space
Creating a Report Generator Report - Adding Searches
  a Search - Testing
  a Search - Adding a Second Search to the Specification Window
  a Search - Testing the Second Search
  a Search - Searching for Tags/Objects, Item Classifications, Contact Classifications and Persons
Creating a Report Generator Report - Adding a Secondary Register
Creating a Report Generator Report - Using Variables and Formulae
Creating a Report Generator Report - Printing Information from Matrices
Creating a Report Generator Report - Bringing Information in from Other Registers
Creating a Report Generator Report - Page Breaks
Creating a Report Generator Report - Filtering Records (Print If)
Creating a Report Generator Report - Adding Check Boxes to the Specification Window
Creating a Report Generator Report - Adding Radio Buttons to the Specification Window
Creating a Report Generator Report - Searching for Records within a Period
Creating a Report Generator Report - Break Points, Subtotals and Totals
Creating a Report Generator Report - Blocks
Creating a Report Generator Report - Syntax
Creating a Report Generator Report - Useful Functions
Example Reports - Listing Sales Figures
Creating a Report Generator Report - Common Error Messages

Tutorials for Standard Accounts

Creating a Report Generator Report - Adding a Secondary Register - Printing Elements with Red Line Overstrikes

This page describes printing information in a Report Generator report with red line overstrikes.

---

Any element (e.g. text, field, formula) can be printed in the report with a red line or "Overstrike" drawn through it, depending on a particular condition. For example, in a list of Invoices that includes Invalidated Invoices, you might want those Invalidated Invoices to be printed with Overstrikes, so that they easily can be distinguished.

When you add an element to the 'Layout' card in a Report Definition, you will be able to specify an Overstrike condition:

In this example, the Invoice Number will be printed with an Overstrike if an Invoice has been Invalidated.

The Overstrike condition is "vrInvoice.Invalid == 1".The vrInvoice.Invalid expression refers to the Invalid field in the Invoice register. The expression is in two parts: the first part ("vrInvoice") is the name of the variable containing the Invoice register. This name was given to the variable in the 'Register' dialogue box as described here. The second part ("Invalid") is the internal name for the Invalid field in the Invoice register. The two parts are separated by a full stop. The expression is case sensitive, so you must use "Invalid" and not "invalid". This expression therefore means "the Invalidated status of the Invoice record that is currently in the vrInvoice variable" i.e. "whether the current Invoice is Invalidated".

The Invalid field can contain two values: it will be 0 if the Invoice is not Invalidated, or 1 if it is Invalidated. It is a boolean field, so there is no need to put the test condition into quotation marks. == means "is equal to". The full expression "vrInvoice.Invalid == 1" therefore states that if vrInvoice.Invalid is equal to 1 (i.e. if the current Invoice is Invalidated), the Invoice Number will be printed with an Overstrike. Be sure not to confuse == and =. For details about the syntax that you should use when entering an Overstrike condition, please refer to the Syntax page.

Note that even though the Overstrike condition applies to a field that is in the same register as the field being printed, you should still use the full vrInvoice.Invalid expression.

You can also include a variable in an Overstrike condition. For example, if you are using a variable to keep a running total and you want to print an Overstrike if the value of that variable falls below zero, the Overstrike condition would be:

TotalVar < 0
Variables are described in more detail here.

In the report illustrated below, we have added the Overstrike condition to the five fields in the Invoice Before section. We also removed the automatic search that excludes invalidated records from the report (this automatic search was described in step 2 on the Adding a Secondary Register page):

Note that the Invalidated Invoice is included in the total for the Customer. If the total should not include Invalidated Invoices, add a Condition to the total:

This Condition uses the same syntax as the Overstrike condition described above. It states that only Invoices that have not been Invalidated will contribute to the total. You can specify a more complex condition such as:
(vrInvoice.Invalid==0) and (vrInvoice.PayDeal!="CN") and (vrInvoice.OKFlag==1)
This condition states that an Invoice will only contribute to the total if it has not been invalidated, if it is not a Credit Note, and if it has been marked as OK. Each part of the condition is enclosed in brackets, and the three parts are joined by "and". This means that all three parts of the condition must be satisfied in an Invoice if it is to be included in the total (i.e. the Invoice must not be Invalidated and it must not be a Credit Note). PayDeal is the internal name for the Payment Terms field in the Invoice register, and OKFlag is the internal name for the OK check box. PayDeal is a string field, so the value being tested for is enclosed in quotation marks. The value being tested for ("CN") is the Code of the Payment Term that represents Credit Notes: you may need to use a different value as the test condition. != means "is not equal to".

Please refer here for details about omitting a primary register record from the report if there are no related records in the secondary register.

---

Creating a Report Generator Report:

Go back to: