Report Creation: To Create a Report Based on One DAC
In the following activity, you will create a report based on one DAC.
Story
Suppose that you are a technical specialist in your company who is working on simple customizations. An accountant of your company has requested a report that collects data about invoices and memos. The accountant wants a simple report that displays columns with the document type, the invoice reference number, and the balance of the invoice with that number.
Process Overview
You will first inspect the Invoices and Memos (AR301000) form to explore which data access classes you can use to access the needed data: the document type, reference number, and balance.
With the knowledge you have obtained, you will create the report and add the columns to be displayed.
When the report is created and all the necessary settings are specified, you will preview and then publish the report.
System Preparation
Before you perform the steps of this activity, make sure that the following tasks have been performed:
- You have installed the MYOB Acumatica Report Designer, as described in Report Designer: To Install the MYOB Acumatica Report Designer.
- You have installed an MYOB Acumatica instance with the U100 dataset, or a system administrator has performed this task for you.
- You have signed in to MYOB Acumatica as the system administrator by using the gibbs username and the
123 password.Tip: The gibbs user is assigned the Administrator role and the Report Designer role. Thus, this user has sufficient access rights to manage system configuration and to preview, save, and publish reports.
Step 1: Discovering DACs and Data Fields
To inspect the user interface elements whose data you will use for your report, do the following:
- In MYOB Acumatica, open the Invoices and Memos (AR301000) form.
- Point to the Reference Nbr. element, press Ctrl+Alt, and then click. The Element Properties dialog box opens. You are interested in the Data Class and Data Field values, which correspond to the class and field you need. Notice that these values are, respectively, ARInvoice and RefNbr. Close the dialog box.
- On the form, point at the Balance element, press Ctrl+Alt, and click to again open the Element Properties dialog box. Notice that the Data Class value is again ARInvoice, while the Data Field value is CuryDocBal. Close the dialog box.
- On the form, inspect the Type element as you inspected elements in the previous instructions to find its data class and data field. Notice that its Data Class value is again ARInvoice and its Data Field value is DocType.
You have discovered that the data access class you need is ARInvoice and the data fields are DocType, RefNbr, and CuryDocBal.
Step 2: Loading the Database Schema
To load the database schema, do the following:
- On the Report Designer menu bar, click to create a report.
An empty report with the default sections opens.
- On the Report Designer menu bar, click .
The Schema Builder opens with the Tables tab selected.
- In the Enter Web Service URL to Load WSDL Document box,
enter the URL of your MYOB Acumatica website, which can be your local website or an external URL of MYOB Acumatica.Tip: The history of successful connections is automatically saved in the drop-down list of the URL box. For example, if you have already opened a report from the server, you can select the URL from the drop-down list.
- Type gibbs as the username and 123 as the password.
- Click Load Schema.
- In the Search box, type
ARInvoice
. - In the Select Report Tables list, click ARInvoice
(PX.Objects.AR.ARInvoice), and click >.
The ARInvoice data access class is placed in the right pane of the Schema Builder.
- In the Schema Builder, click OK.
The Schema Builder is closed.
Step 3: Adding Data to the Report
To add data to the report, while you are still working with the report in the Report Designer, do the following:
- In the Properties pane, open the Fields tab.
- In the list of the fields of the ARInvoice data access class, drag the
DocType field to the
detailSection1
section.Notice that in
detailSection1
, you have a box with the following content:[=[ARInvoice.DocType]]
. - Repeat the actions of the previous instruction with the RefNbr and CuryDocBal fields. Place RefNbr to the right of DocType, and CuryDocBal next to RefNbr.
- In the Tools pane, drag the TextBox element to the
pageHeaderSection1
section. This element will be a column header. Place the element above the element with the[=[ARInvoice.DocType]]
content. - While the text box is selected, go to the Properties tab
of the Properties pane. For the property, enter Document Type.Tip: Alternatively, you could double-click the added text box, enter Document Type, and press the Enter key.
- Add two more TextBox elements to the
pageHeaderSection1
section with the following values: Reference Number and Balance. These elements will be the headers of two other columns. Place these elements above the element with the[=[ARInvoice.RefNbr]]
and[=[ARInvoice.CuryDocBal]]
content. - In the Tools pane, drag the Line element to
pageHeaderSection1
. Extend the line. Place the line below the added text boxes. This line will divide the heading of the table in the report. - Add two more TextBox elements to the
pageHeaderSection1
section with the following values: Page and =[PageOf]. These elements will display the current page number and the total number of pages in the report. - Add one more text box to the
pageHeaderSection1
section with the Invoices and Memos value to display the report name. - Adjust the height of the
pageHeaderSection1
anddetailSection1
sections by dragging the section borders to be the same as the height of the added elements in the sections. Set the height ofpageFooterSection1
to the minimum.
The following screenshot shows the report you have designed.
Before saving the report, preview it. In the Design pane of the Report Designer, go to the Preview tab. If you are not satisfied with the design of the report, move the text boxes to align them.
Step 4: Saving the Report
To save the report on your MYOB Acumatica website, do the following:
- On the Report Designer menu bar, click .
The Save Report on Server dialog box opens.
- In the dialog box, in the Enter Web Service URL to Load Reports List box, type the URL of your MYOB Acumatica website.
- In the Login box, type gibbs, and in the Password box, type 123.
- In the Enter Report Name to Save box, enter the report name: AR308000.
- Click OK.
Step 5: Publishing the Report
To publish the report, do the following:
- In MYOB Acumatica, open the Site Map (SM200520) form.
- Add a new row with the following settings:
- Screen ID: AR.30.80.00
- Title: All Invoices and Memos
- URL: ~/Frames/ReportLauncher.aspx?ID=AR308000.rpx
- Workspaces: Receivables
- Category: Reports
- Save your changes.
- On the Access Rights by Screen (SM201020) form, specify the access
rights for the added report as follows:
- In the Receivables node, click All Invoices and Memos.
- In the right pane, select Granted in the Access Rights column for the ReportDesigner, AR Admin, and Accountant roles.
- On the form toolbar, click Save.
Step 6: Viewing the Report
To view and run the report you have created, do the following:
- In the main menu of MYOB Acumatica, click the Receivables menu item.
- In the Reports category of the Receivables workspace, click All Invoices and Memos.
- On the report form toolbar, click Run Report.
The created report with the information about invoices and memos is displayed. The following screenshot shows the resulting report.