Internal Rate of Return formula - IRR

  • Last update:January 15, 2021
  • I. Description

    Scenario Description: the formula of internal rate of return (IRR) is frequently used in the financial statements of feasibility evaluation and analysis. There is no such formula in FR by default, and the calculation of this value is not purely mathematical. Here's how to do achieve that.

    II. Ideas

    We can create a custom function according to the IRR logic, and then calculate the IRR internal rate of return according to a set of data columns.

    III. Operation steps

    In general, if you want to carry out secondary development on the basis of finereport designer, we can start the designer by calling FineReport startup class in Eclipse or IDEA, so as to facilitate debugging in the development process and preparation for secondary development.

    Note that you need to introduce the jar package under finereport designer. Click Start the Designer in Eclipse for more information.

    1. For complete code, please refer to:

    https://github.com/finereport-overseas/example/blob/release/10.0/src/main/java/com/fr/function/IRR.java


    2. Compiling custom functions

    Put the compiled IRR.classunder WEB-INF, the installation directory of finereport, because IRR.java belongs to package com.fr.function. So IRR.class need to be put in %FR_HOME%\webapps\webroot\WEB-INF\classes\com\fr\function.


    3. Registering custom functions

    After generating the class of the function, you need to register in the designer to use the function. Open server > function manager and select the IRR.class just defined, as shown in the following figure:

    企业微信截图_16073969834791.png


    4. Using custom functions

    After the user-defined function is registered, it can be used directly when making reports. The usage method is the same as the built-in function.

    (1) The effect of IRR formula in Excel

    image.png

    (2) The effect of IRR formula in FR

    Template style design:


    Preview results:

    By comparison, we can know that the formula in FR is more accurate and stable than that in Excel.

    Note: It is unusual to fail to calculate the result.


    Attachment List


    Theme: Secondary Development
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    9s后關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy