For a data source Reports.JS does not support natively, you can register a custom database that answers the engine's data commands yourself.

Register a custom database. Handle each command the engine issues:
Stimulsoft.Report.Dictionary.StiCustomDatabase.registerCustomDatabase({
    serviceName: "MyDatabase",
    process: function (command, callback) {
        if (command.command == "TestConnection") callback({ success: true });
        if (command.command == "RetrieveSchema")  callback({ success: true, data: demoData, types: demoDataTypes });
        if (command.command == "RetrieveData")    callback({ success: true, data: demoData[command.queryString] });
    }
});

How it works. The engine talks to your adapter through the same command protocol as built-in databases, so any source you can query in JavaScript becomes a report data source.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.