Customize Word reports
A Word report (print-ready documents) is a document that is generated based on the records of Creatio sections as a *.docx file. For example, reports of the Contracts section let you print contracts, reports of the Activities section let you print out emails, minutes of meetings, etc. Learn more: Print-ready reports (user documentation).
Creatio lets you use both basic and custom macros in Word reports. Macro is a tool that lets you convert data retrieved from Creatio into data suitable for a Word report. Depending on the usage of macros, Creatio lets you create the following types of Word reports:
- Simple report
- Report that uses basic macros
- Report that uses custom macros
Set up permissions to the Report setup section
You can set up permissions to the Report setup section on the system operation level. If a user lacks the permission to access the Report setup section, they receive a notification about the lack of permissions to execute an operation when trying to load the section. Out of the box, only Creatio administrators have access to key system operations. Creatio lets you configure access permissions to system operations for users or user groups. Learn more: System operation permissions (user documentation).
To set up permissions to the Report setup section:
- Open the Operation permissions section. To do this, click in the top right → Users and administration → Operation permissions.
- Select the Access to "Report setup" section (
CanManageReports
code) system operation. - Set up the access to the Report setup section. To do this, click and specify the user/role in the Operation permission detail.
As a result:
- The record will appear on the Operation permission detail.
- The Access level column of the record will be set to Yes.
- Users that have the specified role will have access to the Report setup section.
General procedure
1. Implement custom macros (optional)
-
Open the needed app in the No-Code Designer.
-
Open the Advanced settings tab in the No-Code Designer. To do this, click in the top right → Application management → Application Hub → select the app → Advanced settings.
-
Create a user-made package to add the schema. To do this, click → Create new package → fill out the package properties → Save.
-
Add the package properties.
- Open the package properties. To do this, click → Properties. This opens the Dependencies tab on the Package properties page.
- Click Add in the Depends on Packages block. This opens the Select package window.
- Select the checkbox for the
CrtNUI
package. TheCrtNUI
package includes theExpressionConverterHelper
schema that implements the basicIExpressionConverter
interface. - Click Select.
- Apply the changes.
-
Change the current package. Instructions: Change the current package.
-
Create the source code schema. To do this, click Add → Source code.
-
Fill out the schema properties.
-
Apply the changes.
-
Add localizable strings. Instructions: Add a localizable string.
-
Implement the business logic.
-
Add the
Terrasoft.Configuration
namespace or any of its nested namespaces in the Schema Designer. -
Add the namespaces the data types of which to utilize in the class using the
using
directive. -
Add the class name that matches the schema name (the Code property).
-
Add an
ExpressionConverterAttribute
attribute that stores the macro tag. This macro can be added to a report column while setting up the report columns.View an example of the
ExpressionConverterAttribute
attribute that stores theCurrentUser
macro tag below.Example of the ExpressionConverterAttribute attribute[ExpressionConverterAttribute("CurrentUser")]
-
Implement the
IExpressionConverter
interface in the class. -
Implement the
Evaluate(object value, string arguments = "")
interface method. The method receives a field value from a report template as a parameter. The method returns a value of thestring
type that replaces the corresponding column in the generated report.
-
-
Publish the schema.
2. Create a report
-
Open the Report setup section. To do this, click in the top right → System setup → Report setup.
-
Click New report.
-
Fill out the report properties.
Property
Property description
Report name*
An arbitrary report name that is displayed on the toolbar.
Object*
The section object for which Creatio will generate a report. For example, to generate a report for Accounts section, set the Object property to "Account."
Type*
Report type. The property is populated automatically using the "MS Word" value and is non-editable.
Show in the list view
Select the checkbox to generate a report from the section if needed. For example, select the checkbox if you need to generate a report from the Accounts section whose object is selected in the Object property.
Show in the record page
Select the checkbox to generate a report from the record page if needed . For example, select the checkbox if you need to generate a report from the account page whose object is selected in the Object property.
-
Apply the changes.
As a result, Creatio will add the report to the Report setup section.
3. Set up the report columns
-
Add the report columns.
- Go to the Set up report data block.
- Add the column of account name. To do this, click → open the Column field → select the corresponding column → click Select.
If you need to use custom macros, add the Id column.
-
Add the macro tag to the column if needed.
-
Open the setting page of the needed column. To do this, go to the Set up report data block and double-click the column or click in the column row.
-
Go to the Title property.
-
Add the macro tag to the column. Creatio lets you add both basic and custom macros.
View the structure of macro to use in Word reports below.
Structure of macro in Word reportsColumnName[#MacroTag|Parameters#]
Creatio lets you add basic macros to different columns and custom macros to the Id column only. Learn more: Basic macros to use in Word reports.
-
Save the changes.
-
-
Apply the changes.
4. Set up the report template
-
Install the Creatio plug-in for Microsoft Word. Instructions: Install Creatio plug-in for Microsoft Word (user documentation). This is a one-time procedure.
-
Run the Microsoft Word app.
-
Connect to the Creatio instance that includes the created report.
-
Open the Creatio tab.
-
Click Connect. This opens the Login window.
-
Enter the Creatio user credentials.
-
Click . This opens the Available Servers window.
-
Click New. This opens the Server Connection Setup window.
-
Fill out the server properties.
Property
Property value
Name
An arbitrary server name. For example, "Creatio."
Link
URL of the Creatio instance that includes the created report. For example,
https://mycreatio.com/
. -
Click OK. This closes the Server Connection Setup window.
-
Click OK. This closes the Available Servers window and adds the server name to the Server field of the Login window.
-
Click OK. This closes the Login window and connects to the Creatio instance.
-
-
Select the report to set up the template.
- Open the Creatio tab.
- Click Select report. This opens the Creatio Word reports window.
- Select the corresponding report.
- Click OK. This closes the Creatio Word reports window and opens the Word report data panel that includes data of the report created in the Creatio instance.
-
Set up the template layout based on your business goals.
5. Upload the file of report template to Creatio
- Open the Creatio tab.
- Click Save to Creatio.
As a result, the template file of the corresponding report will be uploaded to the report page in Creatio.
6. Set up how to display the report
-
Add the report to the section page if needed.
-
Open the list page. To do this, click in the top right → Application management → Application Hub → select the needed app → select the list page.
-
Add a button that opens reports.
-
Add a Button type component to the toolbar of the Freedom UI Designer.
-
Click and fill out the button properties.
Element
Property
Property value
Button that opens reports
Title
Print report
Action
Print report
Which data to print?
Select needed data
-
-
Save the changes.
-
-
Add the report to the record page if needed.
-
Open the form page. To do this, click in the top right → Application management → Application Hub → select the needed app → select the form page.
-
Add a button that opens reports.
-
Add a Button type component to the toolbar of the Freedom UI Designer.
-
Click and fill out the button properties.
Element
Property
Property value
Button that opens reports
Title
Print report
Action
Print report
Print settings
Select "Print report for the current record" or "Print report for the records list" depending on your business goals
-
-
Save the changes.
-
As a result:
- Creatio will add the Print report button that lets you open reports from the section page.
- Creatio will add the Print report button that lets you open reports from the record page.
7. Bind the report to the package
Instructions: Manual data binding.
See also
Print-ready reports (user documentation)
System operation permissions (user documentation)