Skip to main content

13 - Create a Report

Last updated 2/01/2024

This documentation will explain how to create a basic report from a data source.
1. Click Visual in the menu.

2. Click Reports in the sub-menu.


Reports Menu Item
Figure 1 - Reports menu item

Add the Daily Volume Report

1. Click the Add Item button.

2. Type Daily Volume Report in the Title field.


Add the Daily Volume Report
Figure 2 - Add the Daily Volume Report

info
We will need to add the DailyVolumeQuery as our data source so we can select the fields from the query in our template.

3. Click the Data Sources tab.


Data Sources Tab
Figure 3 - Data Sources tab

4. Click the Add Data Sources button.


Add Data Sources Button
Figure 4 - Add Data Sources button

5. Click the lookup icon in the Data Source field and select DailyVolumeQuery (Query).


Data Source Field
Figure 5 - Data Source field

6. Click the Save button in the form app bar.


Save Button
Figure 6 - Save button

7. Click the General tab.


General Tab
Figure 7 - General tab

8. Click in the Template field.

info
When you click in the Template field it will open Five's Rich Editor, this editor is used in various places in Five.

Template Field
Figure 8 - Template field

info
The ribbon across the top of the editor is used to design your report template.

9. Click the Insert Format Block icon and select Heading 1.


Insert Format Block Icon
Figure 9 - Insert Format Block icon

10. Type Daily Volume January 2020 in the template and press Enter/Return.

11. Click the Insert Table icon.

info
You will need to add a table and use Five's _Each built in function to separate the rows in your data source.

Insert Table Icon
Figure 10 - Insert Table icon

12. Highlight two cells vertically and four cells horizontally.

tip
It is not important if you do not select the correct amount of cells required as Five will dynamically add the necessary cells to your table!

Highlight Table Cells
Figure 11 - Highlight table cells

13. Click the Insert Fields icon.

info
You add the fields into the template from your data source/s by clicking the Insert Fields icon.

Insert Fields Icon
Figure 12 - Insert Fields icon

14. Click the lookup icon in the Data Source field and select DailyVolumeQuery.

15. Click the lookup icon in the Reserved Field field and select Captions.

info
The captions are the column headers.

Add Captions
Figure 13 - Add captions

16. Click the lookup icon in the Fields field and click the checkboxes for the Price Date, Stock Code, Name, and Volume fields.


Select Captions
Figure 14 - Select captions

17. Click the Row checkbox.

info
By applying the Row option, Five will separate the captions into indivdual cells across the row.

18. Click the Insert button.


Insert Button
Figure 15 - Insert button

19. Highlight each caption and click the Bold icon.

20. Click in the next available cell after the Volume caption.


Bold Icon
Figure 16 - Bold icon

21. Click the Insert Fields icon.


Insert Fields Icon
Figure 17 - Insert Fields icon

22. Click the lookup icon in the Category field and select Built In.

info
There are two categories, the Built In category enables you to use Five's built in functions. The Custom Made category enables you to write your own custom code to add extra functionality you may need for your report. To do this, you need to add your functions into Five's Code Editor on the General page and then they will be available in the Function lookup after you have selected the category Custom Made.

23. Click the lookup icon in the Function field and select _Each.

info
The _Each function will separate all the records in the returned result.

24. Click the lookup icon in the Data Source field and select DailyVolumeQuery.


Add Records
Figure 18 - Add records

25. Click the lookup icon in the Fields field and click the checkboxes for the StockPrice.PriceDate, Stock.StockCode, Stock.Name, StockPrice.Volume fields.


Select fields
Figure 19 - Select fields

26. Click the Row checkbox.

27. Click the Insert button.


Insert Button
Figure 20 - Insert button

28. Click the Save button in the editor app bar.


Save Button
Figure 21 - Save button

29. Click the Save button in the form app bar.


Save Button
Figure 22 - Save button

info
There are two ways to make your report available in your application. You can either create a menu item for it, or create an action button which will make the report available when the button is clicked. For this documentation, a menu item will be created for the Daily Volume Report.
1. Click Visual in the Menu.

2. Click Menus in the sub-menu.


Menus Menu Item
Figure 23 - Menus menu item

Add the Daily Volume Report Menu

1. Click the Add Item button.

2. Type Daily Volume Report in the Caption field.

3. Type 5 in the Menu Order field.

4. Click the lookup icon in the Action field and select DailyVolumeReport (Report).

5. Optional: Click the Edit button in the Icon field and open an image file.


Add the Daily Volume Report Menu Item
Figure 24 - Add the Daily Volume Report menu item

6. Click the Save button in the form app bar.


Save Button
Figure 25 - Save button

tip
This is a good time to run the Portfolio application to check your Daily Volume Report!

info
How long your report takes to generate is dependent on the number of records that are returned.

Daily Volume Report
Figure 26 - Daily Volume Report