Commit information to DB

  • Last update:April 28, 2021
  • I. Description

    When printing, Sometimes users want to know which reports were printed at what time, and record it in a record table in the database to facilitate viewing of related information. Generally, after clicking print, the print event will be triggered directly. As for the unprinted situations that may occur after clicking print, these are caused by some situations such as printer equipment, etc. In this article, we will take that clicking Printand recording its print information in the library table when previewing the report as an example.

    II. Idea

    In FineReport 10.0, you can click Server>Server Configuration Manager>Pagination Preview Settings, add "After printing" event for editing, select Commit to Database, and then write back the template name and printing time information to the DB table.

    III. Example

    1. Create a table

    Create a new record information table, such as: create a new table in the FRDemoEN database and name it [get]. Enter two fields: year1 and type, both of which are "String".


    2. Add "After printing" event

    Click Server>Server Configuration Manager, select Pagination Preview Settings. In the right column, click to add the "After printing" event, as shown in the figure below:

    1.png

    After selecting Commit to Database and selecting its information record table, and click Smart Add Fields, enter the formula in year1 as above: =today() to get the current date, and enter the formula in type: =reportName to get the currently printed template.


    3. Preview effect

    After the above settings are completed, when clicking Print button, the date of printing the template and the template name will be recorded in the table, and the information can be viewed in the DB table.


    Attachment List


    Theme: Report Application
    • Helpful
    • Not helpful
    • Only read

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

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

    不再提示

    10s後關閉

    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