Page 1 of 1

Datasource header pass

Posted: Thu Jul 29, 2021 4:57 pm
by d.pujdak
Please as we spoke before is there any planning date to support custom headers.

At the moment there is no way to render the report without passing API Key header. There also CORS headers which need to be passed as my requirement.

Image

The proper way to do that is to be able to pass any custom headers:
For example:

Code: Select all

 using (var stiReport = new StiReport())
            {
                stiReport.LoadFromJson(report.ReportData);
                foreach (var db in stiReport.Dictionary.Databases.OfType<StiODataDatabase>())
                {
                    db.Headers.Add("MyCustomHeader", "Some value");
                }
                foreach (var db in stiReport.Dictionary.Databases.OfType<StiJsonDatabase>())
                {
                    db.Headers.Add("MyCustomHeader", "Some value");
                }
                await stiReport.RenderAsync();
                await stiReport.ExportDocumentAsync(StiExportFormat.Pdf, reportFileName + ".pdf");
            }

Re: Datasource header pass

Posted: Fri Jul 30, 2021 8:44 am
by Lech Kulikowski
Hello,

Please send us your request with detailed description onĀ support@stimulsoft.com.

Thank you.