How to Build Custom Reports in TMS Query Studio

Written by

in

TMS Query Studio is a visual database component framework developed by TMS Software that enables developers to integrate powerful, no-code / natural-language query tools directly into their Delphi and C++ Builder VCL applications.

A “Complete Guide” to mastering this studio covers everything from database connection to UI localization, allowing your end-users to filter, group, sort, and join database tables without needing any SQL knowledge. 🧱 Core Architecture & Components

To master the studio, you must understand how its plug-and-play architecture works inside a developer’s Form Designer:

VisualQuery Component: The primary driver. Dropping this onto a form automatically constructs a natural-language query interface for end-users.

Database Adapters: TMS Query Studio works agnostically across database engines via adapters like TatIBXDatabase (for Interbase/Firebird) or components supporting SQLDirect and IBO.

SQL Parser Engine: Seamlessly translates user-dragged visual constraints into clean SQL statements behind the scenes, automatically managing table spaces and preventing syntax errors like duplicated ORDER BY fields. 🛠️ Key Functionalities to Implement

A complete guide to its visual framework dictates configuring the 5 main database actions for the user:

Source Tables: Maps out which database tables the user can select and automatically establishes relational joins between them.

Data Fields: Dictates the selectable attributes (the columns that populate the SQL SELECT clause).

Filter Conditions: Creates human-readable WHERE clauses (e.g., “Where Country equals India”).

Grouping & Ordering: Generates GROUP BY and ORDER BY rules directly via GUI dragging mechanisms. 🌍 Global Localization

Mastering this environment requires knowing how to adapt the interface for global audiences. TMS Query Studio stores all user interface strings—including button captions, dialog text, and menu items—in a isolated structure:

qsLanguage.pas: The single source-of-truth file where localization occurs.

To change languages, you simply swap this file out for one of the pre-translated files inside the \languages directory of your distribution package. 💾 Programmatic Stream Management

For true mastery, developers need to save the queries users build so they don’t have to rebuild them every session. This is handled using streams:

SaveQueriesToStream: Serializes the visual query state into a data stream or file.

LoadQueriesFromStream: Pulls the saved query layout back into the active session window instantly.

⚠️ Note: If you are instead looking for information regarding “Query Studio” for Salesforce Marketing Cloud (a separate free AppExchange app used to test SQL queries against Data Views), or SQL Server Management Studio (SSMS), please let me know so I can tailor the details to that specific ecosystem!

Are you developing a Delphi/C++ Builder app using the TMS Software component, or are you looking to write SQL queries within Salesforce Marketing Cloud’s Query Studio? Overview | TMS Query Studio documentation

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *