Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
English

How can we create a final row that displays aggregated values of the rest of the rows? This is especially important when it comes to reporting. One can design the form such that it serves as a report rather than a means of data entry.

The final row is not a mere record row but serves as a summary of the record rows.

Thai

เราจะสร้างแถวสุดท้ายที่แสดงมูลค่ารวมของแถวที่เหลือได้อย่างไร สิ่งนี้สำคัญเป็นอย่างยิ่งเมื่อพูดถึงการรายงาน หนึ่งสามารถออกแบบแบบฟอร์มที่ทำหน้าที่เป็นรายงานแทนที่จะเป็นค่าเฉลี่ยของการป้อนข้อมูล

แถวสุดท้ายไม่ใช่แถวระเบียนเพียง แต่ทำหน้าที่เป็นบทสรุปของแถวระเบียน

...

For this to happen, there are many ways to do it but we will focus on the dataset data loaded from its binderdata store. First, we can inspect how data is constructed.

...

The grid is using a pair of identical load and store data store binder (which makes sense most of the time so that data is stored and loaded from the same source). We can opt to use JDBC Binder data store as the load binder data store so that we can gain full control on how dataset is returned and constructed.

...

Thai

กริดใช้คู่โหลดที่เหมือนกันและที่เก็บสารยึดเกาะ (ซึ่งใช้เวลาส่วนใหญ่ในการเก็บและโหลดข้อมูลจากแหล่งเดียวกัน) เราสามารถเลือกใช้ JDBC Binder data store เป็น load binder data store เพื่อให้เราสามารถควบคุมได้อย่างเต็มที่ว่าชุดข้อมูลจะถูกส่งคืนและสร้างอย่างไร

ด้วยความสามารถในการกำหนดแบบสอบถาม SQL ของเราเองเราสามารถสร้างแบบสอบถามที่จะกลับแถวสุดท้ายเป็นแถวค่ารวม

...

However, it does not actually play out well with the JDBC Binder data store as it is only expecting one parameter in the query. Our union query has 2 parameters.

...

Thai

อย่างไรก็ตามมันไม่ได้เล่นได้ดีกับ JDBC Binder data store เนื่องจากมันคาดหวังเพียงหนึ่งพารามิเตอร์ในแบบสอบถาม แบบสอบถามแบบร่วมของเรามี 2 พารามิเตอร์

เพื่อเอาชนะสิ่งนี้เราสามารถสร้างโพรซีเดอร์ที่เก็บไว้ในฐานข้อมูลแทน

...

With the stored procedure to return the appropriate dataset that we need, we will just need to call it from the JDBC Binderdata store.

Thai

ด้วยโพรซีเดอร์ที่เก็บไว้เพื่อส่งคืนชุดข้อมูลที่เหมาะสมที่เราต้องการเราจะต้องเรียกมันจาก JDBC Binderdata store

Image Modified

This is the outcome.

...