Reporting in the Aurena Native client is done using the print command keyword and allows a developer to render a client page as a report.
The print
keyword can be used from commands to allow generating a HTML report from a Marble page. A filter can be provided which can specify which record the page should load.
command GenerateCompanyReportCommand { label = "Generate Report"; execute { print CompanyReportPage { filter(CompanyNo, Company); } } }
The report page is defined like any other Marble page. The page will instead be rendered to a report rather than UI. The page does not have to be used anywhere in the UI and can be defined just for reporting.
page CompanyReportPage using Companies { label = "Company ${Company}"; selector TstCompanySelector; group CompanyReportCompanyDetails; list CompanyReportCustomersList(Customers); } group CompanyReportCompanyDetails for TstCompany { label = "Company Details"; field Company; field Name; computedfield ComputedValue { label = "Customers"; value = "Company ${Company} has #{Customers.count(1)} customers"; } } list CompanyReportCustomersList for TstCustomer { label = "Customers"; field CustomerNo; field CustomerName; }
Results in the report:
Used to render a details form to the report.
group CcCaseGeneralGroup for CcCaseDetail { label = "Case Classification"; // fields here }
Used to render a table to the report.
list CcCaseContactList for CcCaseContact { label = "Case Contacts"; // fields here }
Example List:
These elements are both used for loading data within the report. The selector element currently displays nothing in the report and works the same as the singleton.
printdialog
command and operational reports are not supported.This element is used for displaying data from Documents
and Media
from an entity. The respective properties need to be enabled
(shown in the example below)
imageviewer WorkOrderImageViewer for TstOffWorkOrder { label = "Work Order Image Viewer"; collapsed = [false]; height = small; media { enabled = [true]; } documents { enabled = [true]; } }
image
tags within an imageviewer
are not supported. This means, using custom URLs or methods to display these images will not work.