Print Friendly, PDF & Email

Introducing the Custom Report Builder

The Custom Reports and Custom Styles feature allows users to create their own reports and templates. This process is the same for invoices, work orders, statements, purchase orders, and Custom Data Views (CDV). The work of editing and building templates and reports is done inside the Report Designer.

This topic goes over how to edit or create an invoice template. The concepts are the same for all others.

Images Needed

Just FYI. We plan to add images to this help topic in the near future.

Templates Versus Reports

Templates: These are forms such as invoices, sales, estimates, work orders, customer statements, and purchase orders. You have the ability to modify the various templates that we provide or create your own. This is done using the Custom Styles feature within the Print Setup form.

Reports: We are referring to the hundreds of Customer Data Views found under Reports > Custom Data Views. A CDV is a list of information that you can export to Excel or build a report with. We built a large number of CDVs to allow you to access almost all of the information in your database. Examples include Technician Efficiency and Payroll Activity. There are well over 100 to select from. Tip: Check for updates often. We improve and add new reports frequently.

Technical Note: A CDV is basically what software engineers call a “View” or “Stored Procedure”. They are written in a language known as SQL and they are inside your database (or Company File). CDVs work by calling these Views or Stored Procedures and populating the list with that information. That’s what you are building your reports from. They may also be called from lots of other software programs such as MS Excel. That’s how Contractor Compass works too.

Invoice Customization for Training Purposes

Since the Report Designer works the same no matter what you are trying to modify or build, we use an invoice for our example. Invoice templates are probably our most popular templates to work with.

Using the Report Designer

Opening the Custom Report Designer

The Invoice/Sale/Credit/Estimate list allows creation of Custom Reports. To access the Custom Report Designer, select Reports from the Invoice/Sale/Credit/Estimate list menu, and then click on Invoice Print Setup.

  1. From the main menu, select Customers | Invoice/Sale/Credit/Estimate List | Reports | Invoice Print Setup
  2. Select the arrow for the Custom Styles fly-out menu. The menu will display an <Add New> prompt. This is where you will name and store your custom report. If a custom template has already been created, you can choose that template or create a new one.
  3. Select <Add New> from the fly-out menu to create a new template. An Invoice template will appear in a new window.

The Custom Invoice template is now in “Design View”. We will cover some of the menu options first.

Exporting and Importing Templates & Reports

File Format

Templates and reports are saves with the extension .rpx (example: ServiceInvoice.rpx). This is a proprietary report format that cannot be opened with programs such as MS Word. You must use the Aptora Report Builder to work with these files.

Importing

  1. From various forms, such as an invoice or work order, click Menu > Print/Email Setup
  2. Click the Custom Styles > Add New (you must click New and not be editing a template).
  3. From the main menu (top left), click Templates > Import File From Aptora (the file could come from anyone).

The “Import File from Aptora” menu selection is located in the Report Designer. It is only available when creating a new template. It allows you to import templates built by Aptora or other software users.

Exporting

  1. From various forms, such as an invoice or work order, click Menu > Print/Email Setup
  2. Click the Custom Styles dropdown list. Select an existing template and click the Edit button. You may also click Add New.
  3. From the main menu (top left), click Report > Export Template File. If you don’t see this option, see the note below.*
  4. Give the file a name, select a location to save the file, and click

The “Export Template File” is available in the Report Designer. It allows users to export their reports and templates to share with other Aptora software users. Please feel free to share your work with other companies!

*If your version does not have the Export menu option, here is what to do. Open the Preview tab. Press and hold the Shift key and the Ctrl key and press the F2 button.

Page Setup Dialog

The Page Setup form allows you to change page margins, printer settings, and page grid settings. You may also customize Styles such as Header 1, Header 2, Header 3, etc. You can also create your own Styles.

To access this form from the Report Designer, click Report > Page Settings. There are four tabs.

Page Setup Tab

  1. From the Page Setup dialog, changes can be made to the page’s margins (left, right, top and bottom), a gutter can be specified, and the mirror margins option can be selected.
  2. By setting a Gutter and selecting Mirror Margins, reports can easily be set up for publishing purposes.
  3. When Mirror Margins is selected, the report sets the inside margins for opposite pages to be the same width and the outside margins for opposite pages to be the same width.
  4. Specifying a Gutter will give extra space between the page’s edge and the page’s margins. By using these settings, extra space is provided so reports can be bound together

Printer Settings Tab

  1. From the Printer Settings dialog, changes can be made to the printer’s paper size and orientation, as well as indicating the paper bin, what type of collation to use, and if the report should be duplexed.
  2. The Printer Settings dialog also allows custom paper sizes to be specified. A custom paper size can be set up by selecting “Custom paper size” from the PaperSize dropdown box. Once this option has been selected, the width and height options will allow a specific height and width to be set (in twips).
  3. Note: Custom paper sizes will only work if the selected printer supports the specified paper size. If an unsupported paper size is set, the custom size will be ignored.

Grid Settings Tab

Options to control the way the page grid looks and reacts. The Page Grid is used to help the person working on the report with alignment and related issues.

Styles Tab

This tab allows you to customize the built-in styles such as Header 1, Header 2, Header 3. This features works like Microsoft Word. You can also create your own.

Edit Report Info

Under the Reports menu is Edit Report Info. This is where you can edit the report name and description. The description can be helpful to explain the reason behind the report or template or when and why it is used..

Elements of the Designer

There are four main sections: Toolbar, Fields Window, Designer, and Properties Window.

  1. Toolbar: At the top, you will find numerous buttons. Each button has been defined a little further down in this article.
  2. Fields Window: The left side of the custom template consists of a list of fields that can be manipulated, or customized (red arrow).
  3. Designer: The custom report template shows in the center pane. This is what is called the Report Editor. We cover that in detail next.
  4. Properties Window: The right side of the window displays the properties and formatting categories for each component of the custom report (cyan arrow).

Design and Preview Windows

The bottom right of the template window reveals two view buttons: Design and Preview. The “Design” button shows you the template as it is being modified. Selecting the “Preview” button will allow you to see the document in “Print Preview” without saving. At any time during the modification process the view can be toggled back and forth to view the progress of the custom Invoice.

Configuring the Properties Window

The column in which the property features reside can be altered to reveal the category for each individual property to aid in formatting.

Selecting the hierarchy button reveals the categories for the document properties. Selecting the “+” button expands the list and clicking on the “–” button closes the list category.

Selecting the A-Z ascending button will remove the category headers and reveal the property fields list only.

Sections of the Report Editor

The center area is where you place the various fields and other elements of the report. This is where you spend most of your time editing. Most of the work is drag and drop.

There are just seven section types that you need to understand. These are import because they control how your report is organized and where information breaks from one page to the other.

Report Header: A report can have one report header section that prints at the beginning of the report. It is generally used to print a report title, a summary table, a chart or any information that needs to appear only once at the report’s start.

Report Footer: A report can have one report footer section that prints at the end of the report. It is used to print a summary of the report, grand totals or any information that needs to print once at the report’s end.

Page Header: A report can have one page header section that prints at the top of each page. It is the first section that prints on the page except when the page contains a report header section. The page header section is used to print column headers, page numbers, a page title or any information that needs to appear at the top of each page.

Page Footer: A report can have one page footer section that prints at the bottom of each page. It is used to print page totals, page numbers or any other information that needs to appear at the bottom of each page.

Group Header and Group Footer: Reports can be grouped by using Group Headers/Footers with their DataField properties set to the database field being grouped on (like Customer ID). A report can consist of single or multiple (nested) groups, with each group having its own header and footer sections. The designer allows up to 32 nested groups in a single report.

The header section(s) are inserted and printed immediately before the detail section. The footer section(s) are inserted and printed immediately after the detail section. The number of times each group section prints depends on how the data is grouped. The designer starts a new group (Header, Detail, and Footer) when the data to which the group is bound changes.

The data is sorted according to how the data is sorted on the form or list the page is based on.

Tip: The concept of grouping is very important to understand. This is how your reports are mostly organized. A Group Header might be bound (tied) to Customer ID. The Details section would list fields by Customer.

Detail: A report has one detail section. The detail section is the body of the report and one instance is created for each record in the report. This section is where the items are listed. If you were building a sales report, this is where the invoices would be listed.

Customizing an Invoice

Reminder: We are using an Invoice template as an example, for training purposes. These techniques are the same, regardless of the template or report.

Headers and Footers

Choose the first section header and adjust that area of the Invoice, as needed.

Scroll down and select subsequent headers and adjust by placing your cursor on the header until it becomes a double-arrowed cross. Click and drag the header to the preferred location. To the left of the template is a list of the fields that can be added to or removed from the Invoice. The column to the right of the template reveals the editing tools for the Invoice.

Lines or No Lines Attribute

This feature applies to the Details section only. It makes it easy to include vertical lines between your columns. This is a lot easier that trying to work with boarders or drawing lines. You select Lines or No Lines when first creating a template. Once the template is saved, you cannot change this attribute.

  1. Before creating a new custom Invoice, the first step is to determine whether the Invoice will include “Lines” or “No Lines”. These are lines between columns.
  2. The image below shows an example of the Details section of the Invoice with lines separating the different columns within the document.
  3. Selecting “No Lines” will remove the column separators from the Invoice template.
  4. This selection MUST be completed prior to modifying the Invoice. Selecting a template preference erases any changes made to the current document.

Line Builder Button

When working with a template that has the Lines attribute, there will be a button on the toolbar called Line Builder. The form allows you to change the formatting of the lines. This includes position, width, style, color, style, color, and offset.

Adding Fields

  1. All available fields are in a list on the left side of the Designer. The section  caption is “Fields”.
  2. Adding a field to the template is as easy as clicking and dragging the field box to the preferred location in the Invoice.
  3. You can copy and paste fields. You cannot drag a field from one section to another section. There are some circumstances that do not allow you to paste a field that was copied.
    • Note: “Trans” is an abbreviation for “Transaction”.

Editing Field Properties

  1. Field properties allow you to control the look and or behavior of the field. Certain fields have certain properties and capabilities. See the section called “Field Properties” for more information.
  2. You may edit the properties of a field by clicking on that field (highlighting it). The properties will be displayed on the right side of the Designer.
  3. You should also right-click on the field to see what menu options are available.

Resizing Fields

Manipulating the size of the text/image box simply requires clicking and dragging the box edges to the desired dimensions. To resize a text/image box, simply click and drag the edges of the box to match the desired dimensions. You can also enter dimensions directly into the properties.

Removing Fields

To remove a field from the template, select the text/image box to highlight it. Once the text/image box is highlighted (designated by small green squares outlining the box), right-click in the highlighted area and select “Delete”. “Cut” and “Copy” options are available through this menu, as well.

Adding an Image

  1. To add a picture or graphic to the custom Invoice, find and select the image icon on the template toolbar. This selection will change your mouse cursor into a thin cross shape.
  2. Click the Invoice in the area where the graphic is to be placed. Drag the cursor until the image box is the size necessary for the image to fit. The image box will become bold and easy to see for proper measuring. Once the image box has been sized, it will change from a clearer, darker color to a lighter color highlighted with small green squares. The image box is now ready for a picture to be added.
  3. The darker, bolder color of the image box (left) makes tracking the size of the box easy. Once the box has been sized, it becomes lighter in color and the highlight squares appear (right). The image box is now ready to be filled with a graphic.
  4. Adding an image requires returning to the edit tools column to the left of the custom template. Locate the “Picture” option among the tools and select it.
  5. The gray square will appear to the right of the option. Click once on the box and a window will open allowing for a search of the chosen image.
  6. Find the appropriate image from the computer files and select the “Open” button. The image selected for the custom Invoice must be edited and/or sized prior to placing it into an Invoice.
  7. Once the image is in the Invoice, it can be moved around inside the image box, but the actual image cannot be edited once it is in the report. The image box can also be manipulated once the image is in the Invoice to make it larger or smaller based on the image. The image (and box) can also be moved within the Invoice.
  8. Experiment with the SizeMode property for the best look.

Toolbar Button and Field Definitions

This sections refers to the large collection of buttons at the top of the Designer form. These buttons are there to help the designer build the report. Hover your mouse pointer over any button to view a brief description of what that button is used for (called a Tool Tip).

Buttons Related to Field Types

These are the various types of fields that you can work with. Each field has its own priorities that control the look and function.

  1. The “Label” tool will allow for a new label in the Invoice. Labels include all field headers, e.g. Bill to Address, Agreement #, PO #, Terms, Item, etc.
  2. The “Textbox” tool works exactly like the “Label” tool, except it allows for text, not labels, to be added to the Invoice.
  3. The “Image” tool allows for images to be added to the page.
  4. The “Line” tool works like the same tool in the Microsoft®  Word Drawing toolbar. This tool is used for making lines in the Invoice document.
  5. The “Shape” tool allows creation of simple shapes in the Invoice.
  6. The “Rich Text” tool allows for creating a text box in the Invoice document and entering text directly into that box. There is no need to enter text in the edit tools column of the custom Invoice when using the “Rich Text” tool.
  7. The “Check Box” tool will create a check box in the document. This tool is more commonly used for custom Work Orders.
  8. The “Border” tool will place a border around the selected object or box. Borders can also be formatted based on color and line style. Preset options are available, and a shadow can be added to the border, as well.

Buttons Related to Editing Fields

These are the buttons that allow you to edit the fields.

  1. The “Select” tool gives the ability to click on and drag a field box to another location in the document. Right-clicking will produce a fly-out menu.
  2. The “Font Style” tool simply allows users to select the preferred font style for the Invoice.
  3. The “Font Size” tool changes the size of the text.
  4. The “Bold” tool makes the text in the selected text box bold.
  5. The “Italics” tool italicizes the text in the selected text box.
  6. The “Underline” tool underlines the text in the selected text box.
  7. The “Font Settings” tool makes it simple to make multiple text changes by combining all text editing tools into one setting.
  8. The “Left Align” tool aligns the left margin of the text to the far left.
  9. The “Center Align” tool centers all the text in the selected text box.
  10. The “Right Align” tool aligns the right margin of the text to the far right.
  11. The “Back Color” tool adds the chosen color to the selected text/image box. This tool can also modify the actual page color by making sure no text/image boxes are selected, clicking in a clear area of the document and selecting the preferred color.
  12. The “Line Color” tool adds the chosen color to the selected line in the Invoice.
  13. The “Line Style” tool formats the selected line.
  14. The “Undo” tool removes the last change(s) made to the document.
  15. The “Cut” tool removes the selected item from the Invoice and allows it to be pasted in another area or section of the Invoice. “Cut” differs from “Delete” in that it saves the item for placement. If another item is cut, however, before the previous item has been pasted, the first item will be lost.
  16. The “Copy” tool copies the selected item, eliminating the need to recreate it. Once copied, the item can be pasted anywhere in the document, similar to a “Cut” item.
  17. The “Paste” tool places the cut or copied item in the area selected in the document.
  18. The “Delete” tool will remove the selected item permanently from the document.
  19. The “Bring To Front” tool will place the selected item in front of any other overlapping item. The front item will show in its entirety while any overlapping items will show only what is not being covered by the front item.
  20. The “Send To Back” tool works like the “Bring to Front” tool, except it sends the selected item to the back of any overlapping items. So, only the areas of the item not overlapping will show.

Buttons Related to Multi-Field Editing

Unless otherwise noted, the following tools are active only when two or more boxes are selected. They will operate within each section of the Invoice only and, although they will move the selected boxes inside each section, they will not move a box from one section to another.

  1. The “Align Lefts” tool is only active when two or more boxes are selected. This tool will align the left side of each selected box based on the placement of the box closest to the left of the page. NOTE: This tool operates only within each section of the Invoice only and, although it will move the selected boxes inside each section, it will not move a box from one section to another.
  2. The “Align Centers” tool is only active when two or more boxes are selected. This tool will align the center of each selected box based on the placement of the box closest to the center of the page. NOTE: This tool operates only within each section of the Invoice only and, although it will move the selected boxes inside each section, it will not move a box from one section to another.
  3. The “Align Rights” tool is only active when two or more boxes are selected. This tool will align the right side of each selected box based on the placement of the box closest to the right of the page. NOTE: This tool operates only within each section of the Invoice only and, although it will move the selected boxes inside each section, it will not move a box from one section to another.
  4. The “Align Tops” tool is only active when two or more boxes are selected. This tool will align the tops of the selected box based on the placement of the box closest to the top of the section. NOTE: This tool operates only within each section of the Invoice only and, although it will move the selected boxes inside each section, it will not move a box from one section to another.
  5. The “Align Middles” tool is only active when two or more boxes are selected. This tool will align the middle of the selected box based on the placement of the box closest to the middle of the section. NOTE: This tool operates only within each section of the Invoice only and, although it will move the selected boxes inside each section, it will not move a box from one section to another.
  6. The “Align Bottoms” tool is only active when two or more boxes are selected. This tool will align the bottoms of the selected boxes based on the placement of the box closest to the bottom of the section. .
  7. The “Align To Grid” tool aligns the text/image box to the nearest row of dots on the grid. This tool does not require multiple box selections to function.
  8. The “Size Widths” tool is only active when two or more boxes are selected. This tool will resize boxes based on the width of the last box selected in the group.
  9. The “Size Heights” tool is only active when two or more boxes are selected. This tool will resize boxes based on the height of the last box selected in the group.
  10. The “Size Both” tool is only active when two or more boxes are selected. This tool will resize boxes based on the width and height of the last box selected in the group.

Other Buttons

  1. Page Break: This tool is used to add page breaks to the document. Page breaks can only be created in Detail or Group sections.
  2. Page Number: This tool allows page numbers to be added to the Invoice. When choosing to include page numbers, options for the location and style of the page numbers are available.
  3. Line Builder: When working with a template that has the Lines attribute, there will be a button on the toolbar called Line Builder. The form allows you to change the formatting of the lines. This includes position, width, style, color, style, color, and offset.
  4. Summary Field: Summary fields can be added to any section to calculate totals, counts, averages and other aggregations. The summary field’s placement dictates when the section containing the field, and sections after it, will be printed. A section with a summary field will be delayed until all the calculations are completed. This allows summary fields to be place ahead of their detail. See the Summary Field section below, for more details.
  5. Script Editor: This is an advanced tool that allows users to add code to control the behavior of their report. The code used is known as Active Scripting and is saved in the report file. This code is very much like Microsoft’s VBA (Visual Basic for Applications). You could use this code to control when an image is visible. For example, Aptora uses it for the Void and Paid images. When you open the Script Editor, you might see examples of code created by Aptora. Aptora support agents cannot support the use of this feature. It is being provided for use only by computer programmers and those trained in software development. More information about Active Scripting might be found on the internet.

Context Menus

Context Menus can be accessed by right-clicking on the report. Some options will not be available (disabled or grayed out) when they are not related to what you are doing.

  1. Insert > Group Header/Footer: Adds a new group header/footer pair to the report.
  2. Insert > Page Header / Footer: Adds a new page header/footer pair to the report. A single pair is allowed per report. This option is disabled once the first pair is added.
  3. Insert > Report Header / Footer: Adds a new report header/footer pair to the report. A single pair is allowed per report. This option is disabled once the first pair is added.
  4. Delete Section: Deletes the current selected section from the report. This option does not apply to the Detail section in the report.
  5. Reorder Groups: This option is available when more than one group section are added to the report. It displays a dialog box to allow changes to the nesting order of the group sections in the report.
  6. Cut: Cuts the selected control to the clipboard.
  7. Copy: Copies the selected control to the clipboard
  8. Paste: Pastes the contents of the clipboard into the current section.
  9. Bring to Front: Brings the selected control to the top of the Z-Order
  10. Send to Back: Sends the selected control to the bottom of the Z-Order
  11. Align: Aligns controls to any of their vertical or horizontal coordinates.
  12. Size: Sizes the controls to same width, height or both.
  13. Format Border: Displays the border dialog box.

Field Properties

Now that you understand what each report section does and how they control a report, it’s time to take a look at the various properties that control how fields look and function. You will find these listed on the right-side of the designer.

Note: Properties are shown when you click on a field. You may not see all of these properties. The ones that are available depend on the Field type.

  1. Alignment: This function justifies the text left, right, or center (depending on the selection) inside the text box.
  2. BackColor: This function alters the color of a text box or of the entire document, depending on what is selected. If a box is selected, that box will receive the new color. If no selection is made, the entire section of the document where the cursor lies will receive the new color.
  3. BackStyle: This function determines whether the new color will be applied to the template. If the property is Transparent, the color chosen (see BackColor above) will not appear. If the property is changed to Normal, the color will appear on the Invoice.
  4. CanGrow: This property determines whether the text box will grow vertically to accommodate text that expands past the original text box size.
  5. CanShrink: This property determines whether the text box will shrink vertically to fit a small amount of text.
  6. ClassName: This property sets or returns the controls global style. The global styles are specified in the styles drop-down window.
  7. DataField: This property refers to the type of information contained within the selected text box.
  8. Font: This property refers to the font style for the chosen box.
  9. ForeColor: This property refers to the color of the text.
  10. Height: This property refers to the height of the selected text box.
  11. Left: This property refers to the distance of the left edge of the selected box from the left side of the page.
  12. MultiLine: This property determines whether the contents of the field should wrap across multiple lines. When set to False, the field text is limited to a single line regardless of the height or CanGrow properties.
  13. OutputFormat: This property refers to the format of any field. Numbers, dates, and other number groups can be formatted through this feature. Custom number formatting is also allowed through this feature.Text: This property refers to the actual text inside a box, unlike the “DataField” property which refers to the type of information in the selected box.Top: This property refers to the distance of the top of the selected box from the top of the section.
  14. SummaryFields: There are several of these. Their names all start with “Summary” Please see the section called Summary Fields below for details on each.
  15. Vertical Alignment: This property refers to the placement of the text within the selected text box.
  16. Width: This property refers to the width of the selected box.
  17. WordWrap: This property refers to wrapping the text inside a box so it is visible when the box’s height is extended or the width lengthened. If WordWrap is disabled, the text is only revealed when the width of the box is lengthened enough to see it all.
  18. Angle: This property refers to the angle of the Label text. A positive number will raise the left side of the text string and lower the right side of the text string. Inputting a negative number will do the exact opposite.
  19. Caption: This property refers to the header text in a Label box.
  20. Bullet Indent: This feature returns or sets the amount of indent used in a RichEdit control when SelBullet is set to True.
  21. MaxLength: This property specifies the maximum number of characters a user can enter in the control. The default for MaxLength is 0, indicating that the text is limited only by available system resources. Any number greater than 0 indicates the maximum number of characters.
  22. MultiLine: This property refers to the number of text lines in a Rich Text box.
  23. LineColor: This property refers to the color of the selected line. The color can be altered through this feature.
  24. LineStyle: This property refers to the type of line, and the line type can be changed through this feature (e.g. solid, dash, dot, etc.).
  25. LineWeight: This property refers to the width of the line, and the line width can be adjusted using this feature.
  26. Picture: This property refers to whether a picture has been inserted into the document and the type of document. Pictures or graphics can be inserted through this feature.
  27. PictureAlignment: This property refers to the alignment of the picture inside the image box.
  28. SizeMode: This property refers to the size of the image within the image box. If the image box is larger than the actual image, this feature can enlarge the image to fit the box.
  29. NewColumn: This property determines whether the report should insert a column-break before and/or after printing the section.
  30. NewPage: This property determines whether the report should insert a page-break before and/or after printing the section.
  31. Repeat: This property determines whether a GroupHeader section should be printed again before its associated detail section when the detail section is broken across multiple pages or columns.
  32. UnderlayNext: This property determines whether the section should print underneath the following section. The following section will start printing starting from the top coordinate of the under-laid section instead of the bottom coordinate.
  33. Picture: This property refers to whether a picture has been inserted into the document and the type of document. Pictures or graphics can be inserted through this feature.
  34. PictureAlignment: This property refers to the alignment of the picture inside the image box.
  35. SizeMode: This property refers to the size of the image within the image box. If the image box is larger than the actual image, this feature can enlarge the image to fit the box.
  36. PrintWidth: This feature sets or returns the report’s printable width in twips (1440 twips = 1 inch). The PrintWidth is the amount of physical space to which a report can print. If the size of the report is changed during run-time, the print width will also need to be adjusted. This makes sure the report fills the entire printable area.
  37. Watermark: This feature adds a specified image to the report’s background. The watermark image can be positioned, sized, aligned and placed on specified pages by using the other watermark properties.
  38. WatermarkAlignment: This feature sets or returns the watermark’s general vertical and horizontal positions when it is added to the canvas.
  39. WatermarkPrintOnPages: This feature sets or returns a value indicating the specific pages to which the watermark should be added. The sytanx can include a single page, page range or a combination of both. For example: 1, 5-8, 9, 10-12.
  40. WatermarkSizeMode: This feature sets or returns how the watermark will be sized when the image is rendered on the canvas. The image can be stretched to fill the page, zoomed in on to extended the image to the closest edges, or clipped to keep the image’s default size.
  41. ColumnLayout: This property determines whether a group header section should use the same column layout of its detail section. When this property is “True”, the number of columns in a detail section will be reflected in the associated group headers and footers.
  42. GrpKeepTogether: This property determines whether group header and footer sections will print as a single block on the same page. The property defaults to ddGrpNone, which allows the group, block to be split across pages.
  43. KeepTogether: determines whether a section should print in its entirety on the same page. When you set this property to True, the section will print on the same page without any page breaks. A False setting allows the section to be split across two or more pages.

Insert Summary Form

Use this form to quickly add a Summary Field to your report.

Form Access

On the toolbar, upper left, between the Line Builder and the Script Editor.

Step-by-Step

There are three selections on this form. Once you click OK, the field will be inserted. You may then set other properties as needed.

  1. Chose Field to Summarize: These are the data fields available in the designer.
  2. Calculate This: The calculation method you wish to use.
  3. Summary Location: The location of the calculation. This is usually a Group Header or Group Footer.

Each of these is defined in more detail below.

Usage

Summary fields can be added to any section to calculate totals, counts, averages and other aggregations. The summary field’s placement dictates when the section containing the field, and sections after it, will be printed. A section with a summary field will be delayed until all the calculations are completed. This allows summary fields to be place ahead of their detail.

Summary fields are calculated according to the field control’s Summary properties. A summary field control is updated with each new detail record. When a field is placed ahead of the detail section (ReportHeader, PageHeader or GroupHeader), the detail section is formatted with each record and the summary field is updated. When all records for the summary level are read, the header section is printed followed by the delayed sections.

Summary fields are controlled by the following field control properties:

 SummaryDistinctField (Chose Field to Summarize)

These are the data fields available in the designer. Example: Customer Name.

SummaryFunction (Calculate This)

Sets the type of aggregation the summary field will use to calculate its total. Summary function can be set to Sum, Average, Count, Min, Max, Variance and Standard Deviation. In addition, you can set the summary function to calculate based on another field’s distinct values.

Distinct summarization is valuable when the field’s value repeats in several detail records and the summary function needs to include a single value from all repeating values.

For example, transaction records of orders might look like this.

Order ID       Date                 Amount
1001                  5/16/2023               3000
1001                  5/30/2023               -500
1001                  6/15/2023              -2500
1002                 4/20/2023               2550
1002                 4/30/2023             -2500

A Count summary function would calculate 5 as the number of records. However, a distinct count on the SummaryDistinct Order ID field would properly return 2 as the number of orders. The same would apply for other distinct functions.

SummaryGroup (Summary Location)
Calculates a subtotal summary for the indicated group. It defines the group section level from which a subtotal should be calculated. It is usually the matching group header section associated with the section where the summary field is placed.

SummaryRunning
Calculates running totals that accumulate with each printing and reset at the specified level. Specifies the type of running summarization to be used. It determines whether the summarization will be accumulated or reset for each level (detail, group or page).

Setting this property ddSRGroup or ddSRAll will make the report print a running summary of the field at the group or report level.

  1. ddSRGroup – Keeps a running total of the specified field within a single group span.
  2. ddSRALL – Keeps a running summary throughout the whole report.

Note: When using the summary functions with a field, the CanGrow and CanShrink properties are disabled for the field.

SummaryType

Specifies where the field’s calculations will be done.

Here are the five settings available:

  1. None: No summarization.
  2. GrandTotal: Specifies a report level summary, evaluates the summary function for all records in the report.
  3. PageTotal: Specifies a page level summary, evaluates the summary function for all records on each page.
  4. SubTotal: Specifies a group level summary, evaluates the summary function for all records in each group level.
  5. PageCount: Specifies a Page Count field.

Notes

  • If the summarized field is placed ahead of it summary level, (for example, placing a page total in the page header or a report grand total in the report header), the containing section and the following sections will not be printed until the summary value is resolved (calculated).
  • When using the summary functions with a field, the CanGrow and CanShrink properties are disabled for the field.

Reports From Custom Data Views

We mentioned that the Custom Report Designer works the same for templates as it does for reports. Here a few things that apply only to CDVs.

  1. How you sort your CDV list is how your report will be sorted. Sorting is done with the Sorting button at the top of the CDV list form. If you are grouping with two or more data fields, you should first sort by Group1 and then sort by Group2.
  2. It does not matter what columns you include in the CDV list, all of the fields will be available in the designer.
  3. Your custom reports will only use lines items if they are in the list. If you use date ranges or other filters, you will be able to limit what is in your report.
  4. You cannot combine multiple CDVs into a single report. One CDV is used for each report.
  5. If you need a CDV added or modified, Aptora can help. Please contact your Account Manager and they will get you a price.

Tips

  • Check for updates to your CDVs often This is done inside the CDV form. CDVs are not updated with the software. When you download a new CDV, you will need to set permissions to view them. This is done in the regular User Security form. Once a CDV is downloaded by one user, they will be available for all users (with permission).
  • Labels should be reserved for information that will appear on each Invoice. Labels only need to be entered once and the template will save the information for the next Invoice using the template. They are not based on information found in the database, like Text boxes
  • All boxes in the custom template can be moved and resized within their respective sections. Though boxes cannot be moved from one section to another by clicking and dragging, they can be copied and/or cut and pasted into a different section.
  • To change font style or size the corresponding box must be selected.
  • To select multiple boxes at one time, hold the Ctrl key or Shift key while making the box selections.
  • To select all items in a section, hold the Ctrl key or Shift key, and then click and drag the mouse cursor across the section.
  • To select all items on a page, hold the Ctrl key or Shift key, and then click and drag the mouse cursor across each section at a time.
  • Place the mouse cursor over the toolbar icons to reveal the Tool Tip for the icons.
  • Many toolbar icons mirror the properties in the right column of the custom template. In some instances, changes to the Invoice can be made in the properties column rather than using the icons.
  • All boxes can be resized by clicking on them to highlight and dragging the edges to the preferred location.
  • When changing the background color of a box or a page, click on BackColor in the properties column and select a color. For the color change to take effect, click on BackStyle and change the condition to Normal.
  • To change a previously selected color back to the grid default, simply change the BackStyle (in the properties column) option to Transparent.
  • If a Field is added to the Invoice but no information is available in the database for that particular field for that customer, it will not be included in the Invoice.
  • If you are a company with multiple databases, you may create the template in one database, export it, then import into the other company files.
  • If your customer wants you to send them a single listing of all their invoices in “one” invoice, group it by the name, work address, or some other customer specific field. Now you can highlight 25 invoices and send them a 2-10 page single invoice.
    You will almost certainly need to use the User Filter feature on your CDV list. If you do not understand or know how to use filters, please review the help topic found here: https://www.aptora.com/help/list-management-filter-center/
  • Grouping and Sorting go hand in hand. When adding group headers to your report template, make sure you are also sorting in the same order.

Related Content

Custom Work Order