Overview
Version
| Report Server Version | Functional Change |
|---|---|
11.0 | / |
11.0.1 | Adjusted the positions of the setting item fields on the Import User setting page. For details, see the section "User Importing." |
Application Scenario
Admins can import an organized user information table into the decision-making platform in one go.
Admins can import data of user information, departments, and roles multiple times.
Admins can edit, disable, and delete the imported users.
You may want the platform users to be a collection made from multiple datasets.
Function Description
You can create a server dataset based on a user information table and import user information into the decision-making platform. After importing user information, you need to manually import user information again if you want to add or delete users in the server dataset. Platform users can be a collection made from multiple datasets.
The previously added/imported user data will not be cleared if you do not switch the encryption method during the dataset import.
User Data Preparation
The imported user data comes from server datasets, and the system supports the import of both hierarchical and non-hierarchical user department data.
You can select a required server dataset type based on the structure of your data.
Non-Hierarchical Structure - SQL Dataset
The departments and positions in the user information table used in this example are non-hierarchical. Departments of the imported users are all listed under All Departments in a non-hierarchical structure, as shown in the following figure.

User Information Table Preparation
Prepare a user information table. The following figure shows the table structure.
Download the user information table: Importing_Users_1.xlsx.
Note:1. During user import, Username, Name, and Password are mandatory fields, and other information can be left blank.
2. The Mobile field supports mobile numbers in Mainland China, Taiwan (China), Hong Kong (China), Türkiye, South Korea, Japan, Singapore, and Malaysia.
Mobile numbers in mainland China do not need the area code (you can add the code if you want), while those in other regions and countries do.

Server Dataset Creation
You can use a third-party database management tool to import the above table into a database and establish a data connection between the decision-making platform and the database. The following takes the FRDemo database as an example.

1. Log in to the decision-making platform as the admin, and choose System Management > Data Connection > Server Dataset > Create Dataset > SQL Dataset, as shown in the following figure.
Set Dataset Name to Importing Users 1, select FRDemo as Data from Data Connection, and enter the SQL statement:
SELECT * FROM Importing_Users_1

Non-Hierarchical Structure - File Dataset
The departments and positions in the user information table used in this example are non-hierarchical. Departments of the imported users are all listed under All Departments in a non-hierarchical structure, as shown in the following figure.

User Information Table Preparation
Prepare a user information table. The following figure shows the table structure.
Download the user information table: Importing_Users_1.xlsx.
Note:1. During user import, Username, Name, and Password are mandatory fields, and other information can be left blank.
2. The Mobile field supports mobile numbers in Mainland China, Taiwan (China), Hong Kong (China), Türkiye, South Korea, Japan, Singapore, and Malaysia.
Mobile numbers in mainland China do not need the area code (you can add the code if you want), while those in other regions and countries do.
3. You can also use TXT/XML files. For details, see File Dataset.

Server Dataset Creation
Save the table locally or upload it to the report project path FineReport installation directory\webapps\webroot\WEB-INF\reportlets.
Log in to the decision-making platform as the admin, and choose System Management > Data Connection > Server Dataset > Create Dataset > File Dataset, as shown in the following figure.

Set Dataset Name to Importing Users - File, and select the table prepared in the section "Non-Hierarchical Structure - File Dataset."
Note:1. If you select Server File, you need to select the file in the report project path FineReport installation directory\webapps\webroot\WEB-INF\reportlets.
If you select Local File, after you upload the file, the file will be automatically saved to the report project path FineReport installation directory\webapps\webroot\WEB-INF\reportlets\excel.
2. You can also use TXT/XML/remote URL files, which support dataset parameters. For details, see File Dataset.

Hierarchical Structure - Tree Dataset
The departments and positions in the user information table used in this example are hierarchical. The following figure shows the departments of the imported users.

User Information Table Preparation
Prepare a user information table. The following figure shows the table structure.

Click to download the user information table: Importing_Users_2.xls.
Note:1. During user import, Username, Name, and Password are mandatory fields, and other information can be left blank.
2. The Mobile field supports mobile numbers in Mainland China, Taiwan (China), Hong Kong (China), Türkiye, South Korea, Japan, Singapore, and Malaysia.
Mobile numbers in mainland China do not need the area code (you can add the code if you want), while those in other regions and countries do.
3. If the server dataset used for user dataset synchronization is a tree dataset, the value of the parent organization of the top-level organization should be Null (not an empty value). For example, the fid (the parent organization ID) value for user Abby (whose department is Headquarters) should not be empty, as shown in the following figure.
4. You can still generate tree datasets and synchronize users even though there are no users under a department (such as the Headquarters that only has subordinate departments without positions and users).

SQL Dataset Creation
You can use a third-party database management tool to import the above table into a database and establish a data connection between the decision-making platform and the database. The following takes the FRDemo database as an example.

1. Log in to the decision-making platform as the admin, and choose System Management > Data Connection > Server Dataset > Create Dataset > SQL Dataset, as shown in the following figure.
Set Dataset Name to Importing Users 2, select FRDemo as Data from Data Connection, and enter the SQL statement:
SELECT * FROM Importing_Users_2

Tree Dataset Creation
Log in to the decision-making platform as the admin, and choose System Management > Data Connection > Server Dataset > Create Dataset > Tree Dataset, as shown in the following figure.

Set Dataset Name to Importing Users - Hierarchical Structure, set Source Dataset to Importing Users 2, set Original Tag Field to did, and set Parent Tag Field to fid, as shown in the following figure.
Note:
User Importing
Log in to the decision-making platform as the admin, and choose System Management > User Management > All Users > Import User to configure user information, as shown in the following figure.

The following content shows the specific setting items.
Info Reservation
| Scenario | Option | Result |
|---|---|---|
Users exist in server datasets but not on the platform. | / | User information is updated to the platform during user importing. |
Users exist on the platform but not in server datasets. | / | Platform user information remains unchanged during user importing. |
Users exist both in server datasets and on the platform. The current platform users come from synchronized users. | / | If duplicate data exists between imported users and synchronized users, the importing of duplicate data will fail, and platform user information will not be updated. |
Users exist both in server datasets and on the platform. The current platform users come from manually added users or imported users. | Info Reservation unselected | The usernames, mobile numbers, mailbox addresses, and passwords are overwritten and updated. The departments and roles are incrementally updated by taking the union of the original platform user information and user information in the server dataset. |
Info Reservation selected | The usernames, mobile numbers, mailbox addresses, and passwords are not updated. The departments and roles are incrementally updated by taking the union of the original platform user information and user information in the server dataset. |
Server Dataset
You can select the required server dataset corresponding to user information.
Field Name
Username, Name, Password, Dept., Position, Role, Mobile, and Mailbox are the field names in the corresponding server dataset.
Note:1. User email information configured in User Management can be used under System Management > System Setting > Mailbox, which allows you to send emails to mailboxes of different platform users through the FineReport platform.
2. Configured Dept. and Position cannot be reverted to unselected states unless you delete and re-add them.
3. The system allows configuring departments without configuring positions.
Encryption Method
Note:You can encrypt the user passwords stored in the FineDB configuration database through the platform. The above operations can ensure that the user's actual login information cannot be obtained even if the database is decrypted.
You can select Built-in SHA Encryption or Custom Password Encryption from the Encryption Method drop-down list.
1. Built-in SHA Encryption
The decision-making platform uses SHA256 encryption to ensure password security.
After you customize and modify a password through an API, the password will be automatically encrypted using SHA256.
2. Custom Password Encryption
Custom Password Encryption refers to customizing a password encryption class where the encryption method is described. The class file is saved in the FineReport installation directory\webapps\webroot\WEB-INF\classes path.
The decision-making platform will perform a second SHA256 encryption based on the user's custom encryption algorithm to ensure password security.
For details about custom encryption examples, see Encryption Settings for the Imported Users' Passwords.
Note:1. Custom encryption algorithms must inherit the AbstractPasswordValidator class.
2. The platform will clear the data of the existing imported/added users, departments, positions, and roles, and reset the admin account if you change the encryption method, as shown in the following figure.
User Management
Admins can edit, disable, and delete imported users. For details, see sections "Editing User Information," "Disabling a User," and "Deleting a User" in User Adding.