restReportService Element Overview
The restReportService
element specifies the configuration settings for the Reporting REST Service. For this element to be respected, the corresponding Reports service implementation should pass a ConfigSectionReportServiceConfiguration instance instead of a ReportServiceConfiguration instance.
For example, initializing the ReportServiceConfiguration for the ReportsControllerBase instance would look like this:
configurationInstance = new ConfigSectionReportServiceConfiguration
{
HostAppId = "Html5DemoApp",
ReportSourceResolver = new UriReportSourceResolver("PATH_TO_REPORTS_FOLDER")
.AddFallbackResolver(new TypeReportSourceResolver());,
};
The initialization block does not have the Storage property set, because it would override the values obtained from the configuration file.
Attributes and Elements
<restReportService>
element
Attributes |
|
Child elements |
|
Parent element | Telerik.Reporting – specifies the root element of the Telerik Reporting configuration settings. Only a single restReportService child element can be used inside the Telerik.Reporting root element. |
<reportResolver>
element
Attributes |
|
Child elements | parameters – specifies a collection of parameters for the current provider. Only one parameters child element can be used in the provider parent element. |
Parent element | restReportService |
<storage>
element
Attributes |
|
Child elements | parameters – specifies a collection of parameters for the current provider. Only one parameters child element can be used in the provider parent element. |
Parent element | restReportService |
Examples
XML-based configuration file:
<configuration>
…
<Telerik.Reporting>
<restReportService hostAppId="Application1" workerCount="4" reportSharingTimeout="10" clientSessionTimeout="10" exceptionsVerbosity="detailed">
<reportResolver provider="type" />
<storage provider="file">
<parameters>
<parameter name="directory" value="C:\Temp\RestServiceStorage" />
</parameters>
</storage>
<!--<storage provider="Redis">
<parameters>
<parameter name="configuration" value="localhost:10001" />
<parameter name="databaseNumber" value="1" />
</parameters>
</storage>-->
<!--<storage provider="MSSQLServer">
<parameters>
<parameter name="connectionString" value="Data Source=(local)\SQLEXPRESS;Initial Catalog=RestServiceStorage;Integrated Security=SSPI" />
<parameter name="commandTimeout" value="60" />
</parameters>
</storage>-->
</restReportService>
</Telerik.Reporting>
…
</configuration>
JSON-based configuration file:
"telerikReporting": {
"restReportService": {
"hostAppId": "Application1",
"workerCount": 4,
"reportSharingTimeout": 10,
"clientSessionTimeout": 10,
"exceptionsVerbosity": "detailed",
"reportResolver": {
"provider": "type"
},
"storage": {
"provider": "file",
"parameters": [
{
"name": "directory",
"value": "c:\\temp"
}
]
}
},
}