Search HansaManuals.com HansaManuals Home >> Standard ERP >> Report Generator >> Creating a New Report Previous Next Entire Chapter in Printable Form Search This text refers to program version 5.3 Adding a Secondary Register - Printing Objects with Red Line Overstrikes Any object (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, if the list of Invoices includes Invalidated Invoices, you might want those Invalidated Invoices to be printed with Overstrikes, so that they can be distinguished easily.When you add an object to the 'Layout' card, you will be able to specify an Overstrike condition: 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:
In the report illustrated below, we have added the Overstrike condition to the five fields in the Invoice Before section: 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:
Please click here for details about omitting primary register records from the report if there are no records in the secondary register. |