When you create reports, you often need to transfer some values from outside. This is to filter the data into the report, or to manage the logic of the report. In my practice of using FastReport.Net, I often encounter this need. Since I mostly work with web reports, I pass the parameters into the report through url. As a rule, my reports are quite complex and are not limited to one parameter. Therefore, there is a need to pass on a list of parameters, namely a list of key value sets. Where the key is the name of the setting.
It is certainly better to consider it by example. In this case, I use ASP .NET Core Web Api app.
Fill the array of reports:
Method of production of the report is asynchronous, since It uses an asynchronous method of converting the report in html format. This format we want to display the report in the browser, as you know:
The essence of this method is the following - we upload the selected report template, parse parameters from the url and transfer their value to the report. Then, we transform a report in html format and return the file to the client.
The names of the parameters that you pass to the report should clearly match the parameters in the report: