Datasource header pass

Stimulsoft Reports.WEB discussion
Post Reply
d.pujdak
Posts: 7
Joined: Wed May 13, 2020 3:44 pm

Datasource header pass

Post 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");
            }
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: Datasource header pass

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply