スケジューラタスクと cpr ファイル権限設定

  • 作成者:ayuan0625
  • 編集回数:24次
  • 最終更新:FRInternational 于 2021-02-01
  • I. Description

    Generally, there are salary options in the company's system. At the end of the month, you can click to view the salary information of the current month, that is, at the end of each month, the current user's salary information of the current month is mounted on the specified salary node. This How to achieve it?

    II. Solution

    In the local task of the timed task, there is an option "In addition to the general results, generate results separately according to users in the default user group", you can check it here. When the timed task is executed, it will be based on the parameters $fine_username$fine_role $fine_position performs data filtering, then the content of the cpr file generated under the user folder of the schedule folder is the salary information of the corresponding user.

    III. Examples

    There is a salary table node under the system virtual directory tree FRTest. At the end of each month, you can view the current user's salary information for that month.

    1. Template preparation

    1)Data preparation

    Click Server> Server Dataset in the designer to create a built-in server data set staff.

    Note: Since the user information needs to be synchronized to the data decision system, only the server data set can be used.

    2)Template making

    Create a new template, drag the data column in the server data set staff to the cell, and add filter conditions to the name data column, as shown below:

    1.png

    Note: This can also be achieved by filtering the role and position of the user, using the corresponding parameters respectively$fine_role、$fine_position

    Please refer to the completed template%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc\SpecialSubject\Timed task authority control.cpt


    2. User configuration

    Click Management System>User Management to import the users in the staff data set, as shown in the figure below:

    2.png

    Please check the user import details Synchronize Users


    3. New timed task

    After the user is configured, click Management System> Task Schedule, the first step——Basic Settings, create a new timed task salary table, the default user group selects "User-Platform", check demo, as shown below:

    3.png

    The second step-scheduling cycle, the scheduling cycle is executed at 12 o'clock on the last day of each month, as shown in the figure below:

    4.png

    Note: For testing convenience, the execution frequency is set to "Only Execute Once".

    Please check the specific adding process Task Schedule Sample - Daily Report

    The third step——Dispatcher Object, the template is the newly created template Timed task authority control.cpt above, check "In addition to the general results, members of the default user group will receive individual results", the user group here is the first step The set default user group, as shown below:

    Note: If checked“In addition to the general results, members of the default user group will receive individual results”, then the template type only supports "Preview"

    5.png

    In this way, the above template has the filter condition name=$fine_username, then when saving the cpr file, it will be archived according to the user name and filtering will be implemented. After the timing task is completed, it will be in %FR_HOME%\webapps\webroot\WEB-INF\ Schedule\file name\date\time will generate user folders. The folder names are the user names in the default user group. For example, the cpr file in the demo folder will be first set to demo before saving $fine_username. Save after filtering to ensure that there is only demo information in the cpr file. When demo logs in to the system, the salary table node mounted under FRTest points to the cpr file, so demo can only see her salary Information.

    The fourth step——File Processing, check the "Mounting Platform", on the mount platform tab, select FRTest for the mount directory, and fill in the monthly salary for the mount name, as shown in the figure below:

    6.png

    Click Save. After the timing task is executed, the user's salary table node will be displayed under the system's virtual directory tree FRTest. When an employee logs into the system, click the salary table node to see his salary information.


    4. cpr node permission assignment

    After the timing task is executed, the cpr file will be generated, under the virtual directory FRTest where the cpr file is mounted, then when the user logs in to the system to view the cpr file salary table, he first needs to have the viewing authority of the node.

    Click Management System> Permission Management-Permissions Quick Configuration, and assign the permissions of the entire FRTest folder to the entire Technical Support department, as shown below:

    7.png

    Please check the detailed configuration process Assign permissions based on department positions.

    Note: Configure the permissions of the virtual directory tree for the user. If the permissions of a folder are assigned to a user role, all new templates added to the folder will be automatically assigned to the user role.


    5. Effect view

    cpr node effect view

    Log in to the system with demo's account, you can see that there is a salary table node under the FRTest directory, click on the node, you can see that only demo's salary information is displayed in the template.

    8.png

    In the same way, after logging in with the accounts of several other users and clicking on the salary table, you can only see the salary information of the user.

    Attachment List


    Theme: FineReport 管理ポータル
    既に最初
    既に最後
    • Helpful
    • Not helpful
    • Only read