Skip to main content
Lesson 9

Modifying the Report Style

Back to S150: Report Designer

Lesson 9: Modifying the Report Style

In this lesson, you will learn how to modify the style of reports.

Report Style: General Information

Each company has its own style for the design of documents, letterheads, and reports. Adhering to the adopted design in your company, you can make a uniform style for Acumatica ERP reports in your company. For this purpose, in the Acumatica Report Designer, you can specify styles for individual elements or apply style templates to the reports that you design and modify.

Learning Objectives

In this chapter, you will learn how to do the following in the Report Designer:

  • Change the style of an element in a report
  • Change the style of number of reports

Applicable Scenarios

You may want to modify the style of a report in the Acumatica Report Designer in the following circumstances:

  • You are responsible for the customization of Acumatica ERP in your company, including developing and modifying reports to give users the information they need to do their jobs.
  • You need to change the style of one element or a group of elements in a report, or apply a uniform style to a number of reports in the system.

Ways to Change the Style of Elements in Reports

Depending on the type of an element in a report, the style of the element can include a number of settings. A report primarily includes text boxes. The style of a text box defines the text font (type, style, and color), text alignment, and background color. In a new report, all elements that you add to the report layout are assigned the default style. You can change the style of elements in a report in the following ways:

  • By specifying the style of an individual element. You can perform this action in the Appearance > Style group of properties. This way of changing the style can be very time-consuming because you need to configure the style of each element in a report. Usually you combine this way with other ways.
  • By selecting a predefined style for an element. You can perform this action in the Appearance > StyleName property. The list of styles in the Appearance > StyleName property consists of the collection of styles specified in the Appearance > StyleSheet property of the report and the collection of styles specified in the style template if one has been applied to the report. If a collection of styles or a style template has not been specified in the report, you cannot use this way (selecting a predefined style for an element) to change the style of elements in the report. Selecting a predefined style for an element gives you the ability to manage a style of multiple elements in a report in one action.
  • By specifying a style template for the report. You can perform this action by using the Appearance > StylesTemplate property. (Style templates are described in more detail later in this topic.) In a new report, no style template is specified. Lesson 9: Modifying the Report Style | 99
             If you are using a font that is not available in Windows by default, you need to make it available for all
             users. To do so, you install it to the C:\Windows\Fonts folder of the application server.
    

Creation of a Collection of Styles

In the Report Designer, you can create a collection of styles for a particular report. Later, you can use styles from
both collections—the collection you have specified for the report, and the collection of styles that is specified in a
style template applied to the report.
You create a collection of styles by using the Appearance > StyleSheet property. This property presents a
collection of styles of different types of elements. Aer you have specified a collection of styles, you can select a
particular element in the report; in the Appearance > StyleName property, you apply the style from the collection
to the selected element.
You add members to a collection of styles in the StyleRule Collection Editor. Then for each member, you specify its
properties in the Style Builder.
In the collection of styles, you can specify multiple members dedicated to the same type of report element. For
example, you can specify members for the text boxes that display the following:
  • Report heading
  • Table heading
  • Data in a report and table content
  • Counted data in the Total rows A new report does not have a collection of styles.

Style Templates for Reports in the Report Designer

The use of a style template is the preferred way to change the style of elements in a report. A style template gives
you the ability to specify uniform settings for elements not only in one report but also in a number of reports. A
style template includes the collection of styles specified in the Appearance > StyleSheet property. A style template
is a file with the RPX extension, as other report files are.
Acumatica ERP has the following predefined style templates, which are stored in the Site/ReportsDefault
folder and on the server:
  • TemplateReport.rpx: Intended for reports for general purposes
  • TemplateForm.rpx: Intended for printable reports You can use the existing style templates, as well as define your own custom style templates. To define a custom style template, in the Report Designer, you do the following:
  1. You create a report.
  2. You select the report in design mode.
  3. You specify the style collection in the Appearance > StyleSheet property.
  4. You save this report locally or on the server.
    Then you can use this report as a style template. You apply a style template as follows:
  5. You select a report—that is, in the Properties pane of the Report Designer, on the Properties tab, you select the report1 Report option.
  6. As the value of the Appearance > StylesTemplate property, you enter (if you want to use a style template from the server) or select (if you want to use a style template from a local folder) the name of the style template file. Lesson 9: Modifying the Report Style | 100
    Aer you have specified a style template for a report, in the Appearance > StyleName property, you can select predefined styles of elements defined in the Appearance > StyleSheet property of the style template file.
           The Appearance > StyleSheet property of the report that you design does not inherit the settings of
           the same property of the style template file.
    

Report Style: To Create and Apply a Style Template

In the following activity, you will learn how to create a style template and apply it to a report.

          This activity is based on the U100 dataset. If you are using another dataset, or if any system settings
          have been changed in U100, these changes can affect the workflow of the activity and the results of
          the processing. To avoid any issues, restore the U100 dataset to its initial state.

Story

Suppose that you are a technical specialist in your company who is working on simple customizations. An accountant has asked you to implement the following new company standards for the reports in the Payables workspace:

  • Reports must have a light-blue background.
  • For report titles, the following font must be used:
  • Type: Bold
  • Style: Times New Roman
  • Size: 12 px
  • Color: Blue
  • For report parameters, the following font must be used:
  • Type: Italic
  • Style: Arial
  • Size: 10 px
  • Color: Black You have decided to create a style template based on the new standards. Then you can apply this style template to the reports in the Payables workspace.

Process Overview

In the Report Designer, you will create a style template. In a new report, in the Appearance > StyleSheet property, you will create a collection of styles in line with the accountant's requirements. You will save the new report as TemplateForPayables.rpx. Then you will apply this style template to the AP6325C1.RPX report, which is a copy of the AP Balance by Vendor (AP632500) report.

System Preparation

Before you begin performing the steps of this activity, launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as a system administrator Kimberly Gibbs by using the gibbs username and the 123 password. Also, to prepare the file that is intended for this activity, do the following:

  1. Download the AP6325C1.rpx file. Lesson 9: Modifying the Report Style | 101
  2. Open the downloaded file in the Report Designer.
  3. On the Report Designer menu bar, select File > Save To Server, which opens the Save Report on Server dialog box.
  4. In the dialog box, specify the connection string and sign-in credentials of your Acumatica ERP instance, type AP6325C1 as the report name, and click OK. The report is saved on the server.

Step 1: Creating a Style Template To create a style template, do the following:

  1. In the Report Designer, click File > New to create a file.
  2. In the Properties pane, to the right of the Appearance > StyleSheet property, click the More button.
  3. In the StyleRule Collection Editor, which opens, click Add. A new member, PX.Reports.Drawing.StyleRule, is added to the Members pane.
  4. In the right pane, specify the properties of the new added member as follows:
  • Name: Type ReportTitle.
  • Style: Click the More button to open the Style Builder, click Text on the le, and specify the following settings:
  • Name: Times New Roman
  • Size: 12 px
  • Color: Blue
  • Bold: Selected Click OK to close the Style Builder.
  1. By repeating the actions of Instructions 3 and 4, add two more members in the StyleRule Collection Editor (see the screenshot below). For the member named Parameters, in the Style Builder, click Text on the le, and specify the following style settings:
  • Name: Arial
  • Size: 10 px
  • Color: Black
  • Italic: Selected For the member named Background, in the Style Builder, click Background on the le, and type #EAF4F4 in the Color box. Lesson 9: Modifying the Report Style | 102
        Figure: The list of styles specified in the StyleRule Collection Editor
    
  1. Click OK to close the StyleRule Collection Editor.
  2. Click File > Save To Server to save the new style template on the server.
  3. In the Save Report on Server dialog box, which opens, specify the connection string and sign-in credentials of your Acumatica ERP instance, enter TemplateForPayables.rpx name as the report name, and click OK. The report is saved on the server.

Step 2: Applying the Style Template to the Report To apply the customized template to the AP6325C1 report, do the following:

  1. In the Report Designer, open the AP6325C1 report. (You have saved this report to the server earlier.)
  2. In the top le corner of the Design pane, click the icon to select the report.
  3. On the Properties tab of the Properties pane, in the Appearance > StylesTemplate property, type TemplateForPayables.rpx.
  4. Click the text box with the report title (in the upper le of the report), and in the Appearance > StyleName property of the Properties pane, select ReportTitle, which is the name of the style that you have defined in the TemplateForPayables template.
  5. Select two text boxes below the box with the report title (Company/Branch: and =@OrgBAccountID) and three text boxes to the right of the report title (=Report.ExtToUI('Batch.FinPeriodID', @PeriodID), =@VendorID, Include Applications), and in the Appearance > StyleName property of the Properties tab, select Parameters. This is the name of the style that you have defined in the TemplateForPayables template.
                  To select multiple text boxes, you first click one text box; you then press and hold the Ctrl key
                  and click the rest of the text boxes.
    
  6. In the top le corner of the Design pane of Report Designer, click the icon to select the report. On the Properties tab of the Properties pane, in the Appearance > StyleName property, select Background, the name of the style that you have defined in the TemplateForPayables style template.
  7. On the Report Designer window toolbar, click Save.

Step 3: Viewing the Report To view the report, do the following: Lesson 9: Modifying the Report Style | 103

  1. In Acumatica ERP, open the S150 Balance by Vendor (AP6325C1) report form by searching for its identifier.
                This report, which you have modified in this activity, has been published in the U100 dataset.
                That is, it has been added to the Site Map (SM200520) form, and you can access it in Acumatica
                ERP.
    
  2. In the Financial Period box of the Report Parameters tab, leave the default value or select 12-2024.
  3. Click Run Report.

Make sure that the report has a light-blue background, the title has the Times New Roman blue bold font (with a size of 12 pixels), and the report parameters have the Arial black italic font (with a size of 10 pixels). Notice that elements in the report may overlap because you have not selected styles from the applied style template for all elements of the report. The following screenshot shows the report with the applied TemplateForPayables style template.

Figure: The AP Balance by Vendor (AP6325C1) report with the new style template applied Lesson 10: Developing Tabular Reports | 104