To design a report you have to configure a document template of the Report type and define its layout using the Report Designer. See the “Adding/Editing Document Templates” section for details.
For the user to be able to produce and print out a report the report layout and the corresponding operation have to be configured. To design a report you have to configure a document template of the Report type (report template) and define its layout using the Report Designer (see the “Adding/Editing Document Templates” section). To get AwareIM to produce the report so that the user can see it and print it out you can do either of the following:
Create Document type on a form of a business object – see the “Adding/Editing Form Operations” section.DISPLAY DOCUMENT action. When the action is executed the report is displayed on the screen as PDF document. Note that the action can generate the report from the template as in the first option or display the document already stored as the value of the attribute of the Document type as in the second option. When you design a report you can refer to attributes of business objects using tag elements – see the “Document Generation” section for details.
When you design a report you can define calculations to be performed inside tag elements. You can use any expressions allowed by the Rule Language. The common expression is, for example, to calculate the sum total of the attribute:
<<SUM Account.Balance>>
See the “Document Generation” section for more details.
Sometimes you may want to group the data shown in a report by some criteria and print out a special header and/or footer for each group. To do this you need to configure the following:
See the “Report Generation” and “Setting Band Properties” sections for more details.
You can show values of attributes of business objects related to a particular business object on a report. For example, if a PurchaseOrder object is related to an OrderLineItem object via a multiple relationship you can show which order line items are related to a particular purchase order on the report.
To include values of attributes of the related object in the report you have to define a sub-report element in the report. The sub-report element must refer to the report showing the instances of the related object and the query of the sub-report element must find the related objects. For example:
FIND OrderLineItem WHERE OrderLineItem IN PurchaseOrder.MyLineItems
See also the “Editing Sub-report/Sub-presentation Element” section.
Sometimes it may be necessary to include a particular element (such as text or image) in the report only under certain conditions (for example, you may show sensitive data to one category of users but not others). In this case you can define a conditional element in the layout of your report and specify the conditions of printing. See the “Reports” and “Editing Conditional Element” sections for details.
Sometimes the same element may be shown with different properties (for example, in different colors) depending on some conditions – for example you can show the account balance in red if it is less than, say, 100 dollars and in green otherwise. This can be achieved by defining a conditional element in the layout of the report. The element will print the text in different colors depending on the conditions - see the “Reports” and “Editing Conditional Element” sections for more details.
Quite often you need to print out either the total number of data records in the report (or page or group) or the sequence number of a data record in the report (or page or group). This can be achieved by using the ELEMENT_COUNT or ELEMENT_COUNTER functions.
If you use ELEMENT_COUNT function inside a tag element the report will print out the total number of data records in the report (or page or group). If you use ELEMENT_COUNTER function inside the tag element the report will print out the sequence number of the data record in the report (or page or group). See the “Editing Tag Element” section for more details. You can also use other report specific functions such as PAGE_NUMBER and NUMBER_OF_PAGES. The full list of such functions is provided in the “Report and Documents Functions” section.
If you want to use the layout of a report in a different report you can export the layout of the first report and then import it into the second report. See the “Adding/Editing Document Templates” section for details on how to export and import the report layout.
In AwareIM documents and files are stored in attributes of the Document type. See the “Attributes of Document Type” and “Document Management” sections for more details.
AwareIM can perform “document merge” of Microsoft Word documents, Microsoft Excel documents, plain text documents and HTML documents. If you want to provide the “document merge” functionality in your system you have to configure document templates of any of the above mentioned types (see the “Adding/Editing Document Templates” section). Alternatively you can use document templates defined by the end user (Developer Edition only)
The templates must include tags that will be “merged” with real data when the final document is produced – see the “Document Generation” section for details on how it is done. To get AwareIM to produce the “merged document” so that the user can see it and print it out you can do either of the following:
DISPLAY DOCUMENT action. When the action is executed the document is displayed on the screen. Note that the action can generate the document from the template as in the first option or display the document already stored as the value of the attribute of the Document type as in the second option. The data that AwareIM will use for the document may come from several sources:
FIND action that will put the desired data into the context.USING clause)
The preferred approach is to use the DISPLAY DOCUMENT action in a process. The action may use the query as the data source. If you are displaying the report AwareIM will just display it on screen. For other types of documents AwareIM will generate as many documents as there are instances returned by the query. You can get AwareIM to display the results on screen and let the user select specific instances to print out. Or you can use the MERGE INTO ONE clause in the action in which case AwareIM will merge all documents into a single document and show it immediately to the user who can then print it out.
This is described in the “User Defined Documents and Reports” and “Building Query” sections.
AwareIM does not support “multiple allowed” for attributes of the Document type, however, there is a way for you to implement “Multiple file upload” functionality when the user selects several documents at once and uploads them all to the system. In order to implement this functionality you need the following:
Document type. It can have other attributes as well, such as Description of the document, type etcOrderAttachment object with the Attachment Document attribute and then define multiple reference attribute Attachments (of the OrderAttachment type) to the Order objectStarting from version 5.7 it is now possible to implement multiple file upload as a process. To do this you need to write a process that assumes that the Context contains a predefined business object called FileItem. This object has one attribute of the Document type called Doc. The process receives multiple instances of this object and it can do something with the documents stored in the Doc attribute – for example, copy them to some other business object, for example:
CREATE Photo FOR EACH FileItem WITH Photo.Picture = FileItem.Doc
There are two ways you can let users edit documents that they store in the attribute of the Document type.
The default approach is to let users download the document, then edit the document outside of AwareIM using the appropriate editor and then let them upload the modified document back into the Document attribute of the business object. When you define an attribute of the Document type AwareIM automatically provides the buttons to upload the document to AwareIM and download it from AwareIM, so this approach is quite straightforward. The disadvantage of this approach is that the user has to perform quite a few steps to modify the document – download, edit and upload back.
An alternative approach is to use Zoho or Office Online document editors to edit/view the document in-place. Zoho (http://www.zoho.com) provides powerful web-based editors to edit many types of documents – MS Word, MS Excel, MS Power Point, Open Office, RTF, HTML etc. The user edits the document using the browser and when he presses the Save button the modified document is automatically saved in AwareIM.
Office Online allows editing Microsoft Office documents only. Just like Zoho the user edits the document using the browser and the changes are automatically saved in AwareIM. To edit documents using Office Online you have to make sure that your server where AwareIM is running meets Microsoft requirements –
By default AwareIM runs Office Online in the testing mode. To enable the production mode create the file called oo.props that contains the following property:
DiscoveryUrl=https://onenote.officeapps.live.com/hosting/discovery
Put this file in the AwareIM/Tomcat/webapps/AwareIM directory.
See also this article for more details about putting Office Online in the production mode: https://wopi.readthedocs.io/en/latest/build_test_ship/shipping.html
To enable document editing feature the configurator has to do the following:
SystemSettings business object that will hold the Zoho API key. At step 4 they need to provide the name of this attribute, rather than the API key itself. Before the system is used by customers their system administrator will need to perform step 2 to register Zoho API key and set its value into the appropriate attribute of the SystemSettings object.
http://myserver.com/AwareIM/logon.html (this will allow editing)
http://localhost/AwareIM/logon.html (this will not allow editing – just viewing)
http://205.46.67.78/AwareIM/logon.html (this will not allow editing – just viewing)
http://myserver.com:8080/AwareIM/logon.html (this will not allow editing – just viewing)
Note also that Zoho editing will not work in the testing mode either.
Embedded spreadsheets can be used to display data as an Excel table or to get Excel to perform calculations that can then be written into attributes of business objects and stored in the database. This can be especially useful if you already have existing Excel spreadsheets that you want to re-use to perform some calculations.
To use embedded spreadsheets in AwareIM you need to do the following:
When the system shows the form of this object in the browser AwareIM will generate a button that will allow users to create and edit spreadsheets. When the user presses this button AwareIM will display an Excel-like spreadsheet. You can create your own spreadsheet or use an existing one by importing an Excel file or using Copy and Paste to paste cells from Excel into the AwareIM spreadsheet.
If you want AwareIM to populate an existing spreadsheet with data from the database you need to specify the contents of the cell as “tag expression” that refers to objects in Context, for example <<Customer.Name>>. The Context will contain the instance of the object that owns the Document attribute with the spreadsheet. When the user presses the “Read Data” button at the top of the spreadsheet AwareIM will replace contents of the cell that have tag expressions with data from the database.
Once the data has been populated Excel will obviously re-calculate everything based on the values read from the database. You can then save results of the calculation in attributes of the object(s) in Context. To do this you need to do the following: