| Both sides previous revision Previous revision Next revision | Previous revision |
| 3400_how_to:0500_reports_and_documents [2026/08/13 04:16] – localdev | 3400_how_to:0500_reports_and_documents [2026/08/13 07:43] (current) – Imported by DokuWiki Advanced Plugin aware_support3 |
|---|
| ===== How to ... ===== | ===== How to ... ===== |
| |
| <accordion id="reports_docs" collapsed="true"> | <accordion autoclose> |
| <panel type="primary" title="Design a Report"> | <anchor id="design_a_report"> |
| | <accordion-item title="Design a Report"> |
| To design a report you have to configure a document template of the Report type and define its layout using the [[2500_config_apps:4200_report_designer|Report Designer]]. See the “[[2500_config_apps:1300_add_edit_doctemp|Adding/Editing Document Templates]]” section for details. | To design a report you have to configure a document template of the Report type and define its layout using the [[2500_config_apps:4200_report_designer|Report Designer]]. See the “[[2500_config_apps:1300_add_edit_doctemp|Adding/Editing Document Templates]]” section for details. |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Produce and Print Out a Report"> | <anchor id="produce_and_print_out_a_report"> |
| | <accordion-item title="Produce and Print Out a Report"> |
| 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 “[[2500_config_apps:1300_add_edit_doctemp|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: | 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 “[[2500_config_apps:1300_add_edit_doctemp|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: |
| |
| - Define an operation of the ''Create Document'' type on a form of a business object – see the “[[..:2500_config_apps:0500_add_edit_objects:0200_defining_forms:0100_adding_editing_forms|Adding/Editing Form Operations]]” section. | - Define an operation of the ''Create Document'' type on a form of a business object – see the “[[..:2500_config_apps:0500_add_edit_objects:0200_defining_forms:0100_adding_editing_forms|Adding/Editing Form Operations]]” section. |
| - A report may be generated as part of the process that uses ''[[ref:a_f:a:display_document|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. | - A report may be generated as part of the process that uses ''[[ref:a_f:a:display_document|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. |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Refer to Database Fields in a Report"> | <anchor id="refer_to_database_fields_in_a_report"> |
| | <accordion-item title="Refer to Database Fields in a Report"> |
| When you design a report you can refer to attributes of business objects using tag elements – see the “[[2000_concepts:0900_prod_feats:0200_working_with_docs_reports:0200_doc_gen|Document Generation]]” section for details. | When you design a report you can refer to attributes of business objects using tag elements – see the “[[2000_concepts:0900_prod_feats:0200_working_with_docs_reports:0200_doc_gen|Document Generation]]” section for details. |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Perform Calculations in a Report"> | <anchor id="perform_calculations_in_a_report"> |
| | <accordion-item title="Perform Calculations in a Report"> |
| 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: | 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: |
| |
| <code aim><<SUM Account.Balance>> </code> | <code aim><<SUM Account.Balance>> </code> |
| |
| See the “[[2000_concepts:0900_prod_feats:0200_working_with_docs_reports:0200_doc_gen|Document Generation]]” section for more details.</panel> | See the “[[2000_concepts:0900_prod_feats:0200_working_with_docs_reports:0200_doc_gen|Document Generation]]” section for more details.</accordion-item> |
| |
| <panel type="primary" title="Group Records in a Report"> | <anchor id="group_records_in_a_report"> |
| | <accordion-item title="Group Records in a Report"> |
| 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: | 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: |
| |
| - The layout of the report must include group bands. Each group band must have a group condition defined. | - The layout of the report must include group bands. Each group band must have a group condition defined. |
| See the “[[2500_config_apps:4200_report_designer|Report Generation]]” and “[[2500_config_apps:4200_report_designer:1400_bands|Setting Band Properties]]” sections for more details. | See the “[[2500_config_apps:4200_report_designer|Report Generation]]” and “[[2500_config_apps:4200_report_designer:1400_bands|Setting Band Properties]]” sections for more details. |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Include Related Records in a Report"> | <anchor id="include_related_records_in_a_report"> |
| | <accordion-item title="Include Related Records in a Report"> |
| 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. | 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. |
| |
| |
| See also the “[[2500_config_apps:4200_report_designer:0300_edit_elements:1000_edit_subreports|Editing Sub-report/Sub-presentation Element]]” section. | See also the “[[2500_config_apps:4200_report_designer:0300_edit_elements:1000_edit_subreports|Editing Sub-report/Sub-presentation Element]]” section. |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Conditionally Include an Element in a Report"> | <anchor id="conditionally_include_an_element_in_a_report"> |
| | <accordion-item title="Conditionally Include an Element in a Report"> |
| 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 “[[2500_config_apps:4200_report_designer|Reports]]” and “[[2500_config_apps:4200_report_designer:0300_edit_elements:0900_conditional_elements|Editing Conditional Element]]” sections for details. | 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 “[[2500_config_apps:4200_report_designer|Reports]]” and “[[2500_config_apps:4200_report_designer:0300_edit_elements:0900_conditional_elements|Editing Conditional Element]]” sections for details. |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Use Conditions to Print Elements in Different Colors"> | <anchor id="use_conditions_to_print_elements_in_different_colors"> |
| 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 “[[2500_config_apps:4200_report_designer:0300_edit_elements|Reports]]” and “[[2500_config_apps:4200_report_designer:0300_edit_elements:0900_conditional_elements|Editing Conditional Element]]” sections for more details.</panel> | <accordion-item title="Use Conditions to Print Elements in Different Colors"> |
| | 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 “[[2500_config_apps:4200_report_designer:0300_edit_elements|Reports]]” and “[[2500_config_apps:4200_report_designer:0300_edit_elements:0900_conditional_elements|Editing Conditional Element]]” sections for more details.</accordion-item> |
| |
| <panel type="primary" title="Enumerate Elements in a Report">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 ''[[ref:a_f:f:af:element_count|ELEMENT_COUNT]]'' or ''[[ref:a_f:f:af:element_counter|ELEMENT_COUNTER]]'' functions. | <anchor id="enumerate_elements_in_a_report"> |
| | <accordion-item title="Enumerate Elements in a Report"> |
| | 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 ''[[ref:a_f:f:af:element_count|ELEMENT_COUNT]]'' or ''[[ref:a_f:f:af:element_counter|ELEMENT_COUNTER]]'' functions. |
| |
| If you use ''[[ref:a_f:f:af:element_count|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 ''[[ref:a_f:f:af:element_counter|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 “[[2500_config_apps:4200_report_designer:0300_edit_elements:0500_edit_tag_elements|Editing Tag Element]]” section for more details. You can also use other report specific functions such as ''[[ref:a_f:f:af:page_number|PAGE_NUMBER]]'' and ''[[ref:a_f:f:af:number_of_pages|NUMBER_OF_PAGES]]''. The full list of such functions is provided in the “[[ref:a_f:f:50_r|Report and Documents Functions]]” section. | If you use ''[[ref:a_f:f:af:element_count|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 ''[[ref:a_f:f:af:element_counter|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 “[[2500_config_apps:4200_report_designer:0300_edit_elements:0500_edit_tag_elements|Editing Tag Element]]” section for more details. You can also use other report specific functions such as ''[[ref:a_f:f:af:page_number|PAGE_NUMBER]]'' and ''[[ref:a_f:f:af:number_of_pages|NUMBER_OF_PAGES]]''. The full list of such functions is provided in the “[[ref:a_f:f:50_r|Report and Documents Functions]]” section. |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Re-use a Report">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 “[[2500_config_apps:1300_add_edit_doctemp|Adding/Editing Document Templates]]” section for details on how to export and import the report layout. | <anchor id="re_use_a_report"> |
| | <accordion-item title="Re-use a Report"> |
| | 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 “[[2500_config_apps:1300_add_edit_doctemp|Adding/Editing Document Templates]]” section for details on how to export and import the report layout. |
| |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Store Documents and Files"> | <anchor id="store_documents_and_files"> |
| | <accordion-item title="Store Documents and Files"> |
| In //**AwareIM**// documents and files are stored in attributes of the Document type. See the “[[2500_config_apps:0700_add_edit_attributes:0700_doc_attrib|Attributes of Document Type]]” and “[[2000_concepts:0900_prod_feats:0200_working_with_docs_reports:0100_doc_man|Document Management]]” sections for more details. | In //**AwareIM**// documents and files are stored in attributes of the Document type. See the “[[2500_config_apps:0700_add_edit_attributes:0700_doc_attrib|Attributes of Document Type]]” and “[[2000_concepts:0900_prod_feats:0200_working_with_docs_reports:0100_doc_man|Document Management]]” sections for more details. |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Do a 'Document Merge'"> | <anchor id="do_a_document_merge"> |
| | <accordion-item title="Do a 'Document Merge'"> |
| //**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 “[[2500_config_apps:1300_add_edit_doctemp|Adding/Editing Document Templates]]” section). Alternatively you can use document templates defined by the end user (Developer Edition only) | //**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 “[[2500_config_apps:1300_add_edit_doctemp|Adding/Editing Document Templates]]” section). Alternatively you can use document templates defined by the end user (Developer Edition only) |
| |
| * You can specify the query when configuring the document template | * You can specify the query when configuring the document template |
| The preferred approach is to use the [[ref:a_f:a:display_document|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. | The preferred approach is to use the [[ref:a_f:a:display_document|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. |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Let End Users Defined Their Own Reports, Document Templates and Queries"> | <anchor id="let_end_users_defined_their_own_reports_document_templates_and_queries"> |
| | <accordion-item title="Let End Users Defined Their Own Reports, Document Templates and Queries"> |
| This is described in the “[[docs:2000_concepts:0900_prod_feats:0200_working_with_docs_reports:0300_reports:#user_defined_documents_and_reports|User Defined Documents and Reports]]” and “[[2000_concepts:0600_data_retrieval:0300_query_build_op_mode|Building Query]]” sections. | This is described in the “[[docs:2000_concepts:0900_prod_feats:0200_working_with_docs_reports:0300_reports:#user_defined_documents_and_reports|User Defined Documents and Reports]]” and “[[2000_concepts:0600_data_retrieval:0300_query_build_op_mode|Building Query]]” sections. |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Implement Multiple Files Upload for Documents"> | <anchor id="implement_multiple_files_upload_for_documents"> |
| | <accordion-item title="Implement Multiple Files Upload for Documents"> |
| //**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: | //**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: |
| |
| |
| <code aim>CREATE Photo FOR EACH FileItem WITH Photo.Picture = FileItem.Doc </code> | <code aim>CREATE Photo FOR EACH FileItem WITH Photo.Picture = FileItem.Doc </code> |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Let Users Edit Documents"> | <anchor id="let_users_edit_documents"> |
| | <accordion-item title="Let Users Edit Documents"> |
| There are two ways you can let users edit documents that they store in the attribute of the Document type. | There are two ways you can let users edit documents that they store in the attribute of the Document type. |
| |
| - If configurators want their users to use their own Zoho account, they will need to define a special attribute in the ''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. | - If configurators want their users to use their own Zoho account, they will need to define a special attribute in the ''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. |
| |
| <callout type="warning" icon="true" title="important">If you want Zoho to edit documents inline the URL that your users use to start the application MUST use the full server name – localhost or raw IP address will not work. Also, AwareIM web server should be set up to run on port 80 (or 443 if using SSL) For example: | <alert type="warning" icon="fa exclamation-triangle"> |
| | **important** |
| | |
| | If you want Zoho to edit documents inline the URL that your users use to start the application MUST use the full server name – localhost or raw IP address will not work. Also, AwareIM web server should be set up to run on port 80 (or 443 if using SSL) For example: |
| |
| [[http://myserver.com/AwareIM/logon.html|http://myserver.com/AwareIM/logon.html]] (this will allow editing)\\ | [[http://myserver.com/AwareIM/logon.html|http://myserver.com/AwareIM/logon.html]] (this will allow editing)\\ |
| |
| Note also that Zoho editing will not work in the testing mode either. | Note also that Zoho editing will not work in the testing mode either. |
| </callout> | </alert> |
| </panel> | </accordion-item> |
| |
| <panel type="primary" title="Work with Embedded Spreadsheets"> | <anchor id="work_with_embedded_spreadsheets"> |
| | <accordion-item title="Work with Embedded Spreadsheets"> |
| 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. | 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. |
| |
| - Click on the “Mapping” button at the top of the spreadsheet to define cells that will be written into attributes of the object(s) in Context. You need to define which cell to write and then provide a tag expression that defines where this cell will be written into. Note that the mapping is saved with the spreadsheet, so you only need to define mapping once | - Click on the “Mapping” button at the top of the spreadsheet to define cells that will be written into attributes of the object(s) in Context. You need to define which cell to write and then provide a tag expression that defines where this cell will be written into. Note that the mapping is saved with the spreadsheet, so you only need to define mapping once |
| - Click on the “Save Data” button to get //**AwareIM**// to save the cells defined in “mapping” into the database | - Click on the “Save Data” button to get //**AwareIM**// to save the cells defined in “mapping” into the database |
| </panel> | </accordion-item> |
| |
| </accordion> | </accordion> |