Submit to database directly without previewing

  • Last update:  2021-05-27
  • I. Overview

    1. Problem description

    Some templates have a large amount of data, but there is no need for modification. They only want to find out the data and submit them directly to the database. When using the default submission, you must preview it first, and then click to submit. When the amount of data is large, previewing the page will be very slow or even stuck. Is there any way to submit to the database directly without previewing it?


    2. Solution

    When accessing the template, splicing the &format=submit behind the url, you can directly submit the data into the database.

    Note: When using normal submission, the verification and page event will no longer take effect.

    II. Example

    1. Prepare tables

    First, create two new tables in FRdemo: Sales_format and Sales_format1.

    Sales_format imports a certain amount of data as the table to be queried, and Sales_format1 is empty as the database table to store the data. These two tables have the same structure, as shown in the following figure:

    1.png


    2. Design report

    1) Create a new general report, create a new dataset ds1, the SQL statement is: SELECT * FROM Sales_format

    2.png

    2) Drag the fields in the dataset to the corresponding cells, so that you can see the results of the query when previewing on the front end, as shown in the following figure:

    3.png

    3) Create a new built-in SQL submission, select Sales_format1 in the database, and bind cells A2~C2 with the fields in Sales_format1, as shown in the following figure:

    4.png


    3. Preview effect

    1) Normal way

    From the figure below, you can see that it takes a long time to wait for the query results to come out before submitting them to the database, which is inefficient.

    5.gif

    2) Submit directly

    Enter http://localhost:8075/webroot/decision/view/report?viewlet=Reuse%252FSubmit_to_database_directly.cpt&op=write&format=submit on the web page to skip the preview and submit the data directly to the database. Compared with the normal method, the speed is significantly faster.

    6.gif

    III. Download template

    Click to download: 

    Submit_to_database_directly.cpt


    Attachment List


    Theme: Data Entry
    • 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