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
Creating a Report Generator Report - Adding a Secondary Register
Creating a Report Generator Report - Using Variables and Formulae
   - Declaring a Variable
   - Assigning a Value to a Variable
   - Printing a Variable
   - More Examples
   - An Alternative Way to Count Records
   - Joining Two or More Pieces of Information Together
   - Joining Strings and Non-Strings
   - Testing
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 - Blocks - Single Record Blocks (Printing Information in the Report Header)

This page describes using information in single-record blocks in Report Generator reports.

---

You can include the contents of a single record block, such as Account Usage S/L or Company Info, in a Report Generator block. It may be that you simply need to be able to print the contents of the block (e.g. to print a list of the Accounts used in the Account Usage S/L setting), or you need to include a piece of information from a block in a larger report.

On this page we will describe printing information from the Company Info setting in the Report Header section of a report. This example demonstrates two techniques: extracting and printing information from a block; and printing information in the Report Header section.

To print information from a single record block, you cannot specify the block as the primary register. As the block is not a multi-row block, you cannot specify a matrix either. To extract information from a block, you need to use the [Look Up] feature, in any section of the report.

If you need any information to be printed in the Report Header (information that can be taken from a block or from a register), you should also use the [Look Up] feature. This is because the Report Header will be printed before any register is declared (i.e. at this point there will be no primary register). A typical report is illustrated below:

In this example, the Report Header will be printed after variable2 has been declared and set to 0, but before the "Register: Contacts..." line stating that the Contact register is the primary register. So, if you need any information to be printed in the Report Header, you must process it before the first "Register:" line.

To print information from a block or a register in the Report Header (e.g. to print your company name or other information from the Company Info setting in the Report Header), follow these steps :

  1. In a new report, click the [Look Up] button. In an existing report, highlight any line above the first "Register:" line and then click the [Look Up] button.

  2. Complete the 'Lookup Record' dialogue box as described on the Bringing Information in from other Registers page. You can choose the block or register using 'Paste Special'. When you first open the 'Paste Special' list, it will contain registers. To see a list of Blocks, click the [Blocks] button in the top left-hand corner of the window.

    If you need to bring information in from a block, you only need enter the Register and Variable Name. A block only contains a single record, and linking to a block automatically makes that single record the current record. So, there is no need to perform a search. In the example below, we have connected to the Company Info setting:

    It is unlikely that you will want to print information from a register in the Report Header. However, if you do, you will need to search in the register for the record that will provide the information to be printed. In the example illustrated below, we have connected to the Contact register, and we will search for the Contact record whose Code matches the vsContCode variable in the specification window:

  3. Go to the 'Layout' card and click on the Report Header section. To print information from the connected block or register, click the [Formula] button. You cannot use the [Field] button because there is no primary register yet and the Report Header section cannot accept fields from the connected block or register. Enter the variable name and appropriate left and right co-ordinates and choose a justification.

    In this example, the expression "vrCY.CompName" will print the Company Name from the Company Info setting. "vrCY" is the name of the variable containing the Company Info setting (as specified in the 'Lookup Record' dialogue box above), and "CompName" is the internal name for the Company Name field in the Company Info setting.
Please refer here for details about using multi-row blocks in reports.

Proceed to:

---

Go back to: