Report Examples

In the following example, we will create a report template that is used in the creation of all other Report entities.

See Also

Reports

Report Entity Example - List Report

Report Entity Example - List Report with Totals

Report Entity Example - Master/Detail Report

Charts as Reports

Template Creation Example

Although Xephr Repositories are initialized with a template for each entity type, we are going to create a new template in order to familiarize you with the process.  

We are creating a report template with a standard header block.

  1. Select the Template Information object.

  2. Right click and select Create Template

  3. The Entity Creation Wizard is displayed.

  4. Click on the Report bullet.

  5. Click on the Next button at the bottom right of the screen to continue.

  6. In the Entity Name property, enter REPORT_TEMPLATE as the entity name.

  7. Leave the Datasource property set to (use default), since there is only one datasource for the Xephr® install.

  8. Leave the Based On property set to (NONE), as this template will not be based off of any other template.

  9. Set the Default Mode property to Parameter Form.  This property determines the default mode for the reports created from this template.  

  10. In the Body Style property, select REPORT_STYLE, which was created in the Style Example section.  This property determines the default style for the report.

  11. In the Editable Field Style property, select REPORT_STYLE, which was created in the Style Example section. .  This property determines the default style for editable fields for the report.

  12. In the Non-Editable Field Style property, select REPORT_STYLE, which was created in the Style Example section.  This property determines the default style for non-editable fields for the report.

  13. In the Lov Style property, select REPORT_STYLE, which was created in the Style Example section.  This property determines the default style for list of values activated for the report.

  14. In the Link Style property, select REPORTS, which was created in the Link Style Example section.  This property determines the default style for links on the report.

  15. Set the Paper Size property to US_LETTER.  This property determines the default paper size for the reports created from this template.

  16. Leave the Orientation property set to Portrait.  This property determines the default orientation for the reports created from this template.

  17. Leave the Document Security property set to Not Secure.  This property determines the default security for reports created from this template.

  18. Click on the Next button at the bottom right of the screen to continue to the block creation section of the wizard.  If you were not going to add a block to the template, you could click on Finish here instead.

  19. In the Block Name property, enter HEADER_BLOCK as the name of the block.

  20. In the Block Type property, select Standard Block.

  21. Set the Query Type property to Not From Query, since the fields will be hard coded for the header.

  22. Leave the Datasource property set to (use default), since there is only one datasource for the Xephr install.

  23. Leave the Create Heading checkbox set to off.  When you set this flag to on, a heading block is created for this block.  Since this is the report header, we don't need a heading for the block.

  24. In the Scheme Selection section, leave the Form bullet set to on.  This block will only display one record at a time (the header), so the Form scheme is the best choice.

  25. Click on the Next button at the bottom right of the screen to add fields to the block.

  26. Click on the Add button to add a field.

  27. In the field, type HEADER_TEXT and press the Enter key on your keyboard.

  28. Click on the Add button to add a field.

  29. In the field, type LOGO and press the Enter key on your keyboard.

  30. Click on the Add button to add a field.

  31. In the field, type REPORT_DATE and press the Enter key on your keyboard.

  32. Click on the Add button to add a field.

  33. In the field, type PAGE_NUMBER and press the Enter key on your keyboard.

  34. Press the Next button on the bottom right of the screen to continue.

  35. Click on the Finish button.

  36. The template is displayed in the Explorer Tree.  Click on the Save button in the main toolbar to save the new report template.

  37. Click on the template object and display the property sheet.

  38. Additional optional changes to make include entering a title and defining the report margins.

  39. In the Title property, enter the title for the report template.

  40. In the Left Margin, Right Margin, Top Margin, and Bottom Margin properties, enter the report margin in the report measurement units.  Since this is a new report template, the measurement units in the Report Layout Measurements In property is set to Points.  Enter 50 in each of these fields to set the margins for the report edges to 50 points.

  41. Click on the Save button in the main toolbar to save the changes to this template.

  42. Select the HEADER_BLOCK block.  Set the Show On property to All Pages.  We want the header block to be displayed on all pages of the report.

  43. Since we added margins to the report, we need to shorten the header block width some.  In the Width field, enter 512.

  44. Right click on the REPORT_TEMPLATE object and select Show Designer Frame from the menu.

  45. Within the Designer Tool, you can move, align, and resize the objects.  For specific instructions on the Designer Tool and its functionality, see the Designer Tool section. Move the fields around until you have placed them in the following order:

  46. Left click on the LOGO field and double click to display the property sheet.  We need to modify the logo field to display our logo.

  47. In the Display As property, select Image.

  48. In the Image Location property, select the previously uploaded logo image - sm_xephr_logo.gif.  When you click out the property, the path to the image will be entered automatically.

  49. To find out the size of the image, in the Explorer Tree, expand the Uploaded Files Information object.

  50. Select the image sm_xephr_logo.gif.  In the image's property sheet, the height and width are displayed.  Note these values.

  51. Select the LOGO field again, and in the Height and Width properties, enter the height and width of the image.

  52. Click on the Save button in the main toolbar to save the changes to this field.

  53. Left click on the HEADER_TEXT field and double click to display the property sheet.  We need to modify the contents of this field to display the desired text.

  54. In the Contents property, enter the desired text.  Report Name.  This will remind those creating reports from the template to enter the report name in the header.

  55. Click on the Save button in the main toolbar to save the changes to this field.

  56. Left click on the REPORT_DATE field and double click to display the property sheet.  We need to modify the contents of this field to display the date the report was printed.

  57. Set the Type pop-list to Date and Time.

  58. Set the Display As pop-list to Text.

  59. In the Format Mask property, select MM-dd-yyyy HH:mm from the pop-list.  This will format the date and time displayed to be in the format 12-31-2003 15:35 if the report was printed on December 31st, 2003 at 3:35 P.M.

  60. In the Is Formula property, select true.

  61. In the Formula property, enter ReportDate().  This formula will determine the report date when the report is generated.

  62. Click on the Save button in the main toolbar to save the changes to this field.

  63. Left click on the PAGE_NUMBER field and double click to display the property sheet.  We need to modify the contents of this field to display the page number for each page printed.

  64. Set the Display As pop-list to Text.

  65. In the Is Formula property, select true.

  66. In the Formula property, enter pageNumber().  This formula will determine the page number for each page when the report is generated.

  67. Click on the Save button in the main toolbar to save the changes to this field.

  68. The header block needs to be shortened so that it is only as high as the logo.  

  69. In the Designer Tool, left click to select the block.  

  70. With your mouse, hover over the bottom edge of the block until the cursor turns into a double headed arrow.  

  71. Then, hold down your left mouse button and drag the bottom edge of the block up until it meets the bottom edge of the logo.

  72. The header block will look as follows when you have completed these changes.

  73. Click on the Save button in the main toolbar to save the changes.

Xephr is a registered trademark of NDS Systems, LC.

Copyright © 2007 NDS Systems LC.