When a report loads data from a protected JSON endpoint, you can attach authentication headers in the onBeginProcessData event.

Add custom headers before the data request.
var report = new Stimulsoft.Report.StiReport();

report.onBeginProcessData = function (args) {
    if (args.database === "JSON" && args.command === "GetData" &&
        args.pathData && args.pathData.indexOf("/reports/ProtectedDemo.json") >= 0) {
        args.headers.push({ key: "X-Auth-Token", value: "*YOUR TOKEN*" });
    }
};

report.loadFile("../reports/SimpleListWithProtectedJson.mrt");
report.renderAsync();

How it works. The engine applies the headers to its data request, so the report can read endpoints behind token or session protection.
Auf dem Screenshot unten Sie können das Ergebnis des Beispiel-Codes ansehen:

Supply Custom Headers for Json Database

Hallo! Brauchen Sie Hilfe?