Search HansaManuals.com HansaManuals Home >> Standard ERP >> Report Generator >> Creating a New Report Eelmine Järgmine Prindi kogu peatükk Otsi Juhend HansaWorld Enterprise'i versioonile 8.5 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: 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. 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): 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 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:
|