### Install and Start Demo Application
Source: https://www.telerik.com/products/reporting/documentation/knowledge-base/display-web-report-designer-in-angular-application
Run these npm commands to install dependencies and start the demo application.
```powershell
npm install
npm start
```
--------------------------------
### Sample Get Document Page Request
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/documents-api/get-document-page
Example of a GET request to fetch page 1 of a document for a specific client and report instance.
```http
GET /api/reports/clients/2c3d/instances/4d3c/documents/5x3a/pages/1 HTTP/1.1
```
--------------------------------
### Configuration Example
Source: https://www.telerik.com/products/reporting/documentation/doc-output/configure-the-export-formats/imageinteractive-device-information-settings
Example of how to configure ImageInteractive device information settings using XML and JSON.
```APIDOC
## Example
XML-based configuration file:
```xml
```
JSON
```json
{
"telerikReporting": {
"extensions": [
{
"name": "IMAGEInteractive",
"parameters": [
{
"name": "OutputFormat",
"value": "PNG"
},
{
"name": "TextRenderingHint",
"value": "AntiAliasGridFit"
}
]
}
]
}
}
```
```
--------------------------------
### Telerik Reporting Setup
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/objectdatasource-component/bind-to-a-businessobject
Example of how to set up and refresh a Telerik Report in a WinForms application.
```APIDOC
## Telerik Reporting Setup
### Description
This code snippet demonstrates how to assign a report document to a Telerik Report Viewer and refresh the report, specifically for WinForms applications.
### Method
Not applicable (Client-side code)
### Endpoint
Not applicable (Client-side code)
### Request Body
Not applicable
### Response
Not applicable
### Code Example (C#)
```csharp
var reportSource = new Telerik.Reporting.InstanceReportSource();
reportSource.ReportDocument = report;
// Assigning the report to the report viewer.
reportViewer1.ReportSource = reportSource;
// Calling the RefreshReport method in case this is a WinForms application.
reportViewer1.RefreshReport();
```
```
--------------------------------
### ExampleAttribute Text Property
Source: https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.expressions.exampleattribute
Gets or sets the example text associated with the attribute.
```csharp
public string Text { get; set; }
```
--------------------------------
### Page Setup ToolTip Constant
Source: https://www.telerik.com/products/reporting/documentation/api/telerik.reportviewer.winforms.resources.keys
Represents the tooltip text for the 'Page Setup' action. Use this for consistent UI text.
```csharp
public const string PageSetupToolTip = "PageSetupToolTip"
```
--------------------------------
### Initialize Telerik Web Report Designer with Full Settings
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/web-report-designer/web-report-designer-initialization
Use this example to initialize the Telerik Web Report Designer with a comprehensive set of configurations. It includes settings for persistence, toolbox layout, service URL, report source, start mode, and report viewer options. Custom event handlers for errors, notifications, and viewer lifecycle are also demonstrated.
```javascript
$(document).ready(function () {
window.TelerikWebReportDesignerDebugMode = true;
$("#webReportDesigner").telerik_WebReportDesigner({
persistSession: false,
toolboxArea: {
layout: "list"
},
serviceUrl: "api/reportdesigner/",
report: "Dashboard.trdp",
// design/preview
startMode: "design",
reportViewerOptions: {
reportSourceParameters: {
ReportYear: 2002
},
scaleMode: "SPECIFIC",
scale: 1.5,
viewMode: "INTERACTIVE",
pageMode: "CONTINUOUS_SCROLL"
},
error: onError,
notificationShowing: onNotificationShowing,
viewerInitializing: onViewerInitializing,
viewerLoading: onViewerLoading
}).data("telerik_WebReportDesigner");
});
function onError(e, args) {
// e: jQuery event;
// args: IErrorEventArgs ->
// message: error message, string;
// error: JS's Error instance.
if (args.error) {
console.log(`An error occurred! Message: ${args.message}; Error type: ${args.error.constructor.name}`);
} else {
console.log(`An error occurred! Message: ${args.message};`);
}
}
function onNotificationShowing(e, args) {
// e: jQuery event
// args: INotificationErrorEventArgs ->
// type: string, obtained from NotificationTypes. Available values: info, warning, error, success
// message: notification message, string.
// error: JS's Error instance
// cancel: boolean, determines if showing the notification will be canceled.
switch (args.type) {
case "success":
case "info":
case "warning":
console.log(`Message: ${args.message}`);
// disable the notification pop-up.
args.cancel = true;
break;
case "error":
if (args.error) {
console.log(`Error message: ${args.message}; Error type: ${args.error.constructor.name}`);
} else {
console.log(`Error message: ${args.message};`);
}
break;
}
}
function onViewerInitializing(e, args) {
// e: jQuery event;
// args: IViewerPreInitEventArgs ->
// reportViewerOptions: report viewer's options. All viewer's options available.
args.reportViewerOptions.parameters = {
editors: {
singleSelect: telerikReportViewer.ParameterEditorTypes.COMBO_BOX,
multiSelect: telerikReportViewer.ParameterEditorTypes.COMBO_BOX
}
};
args.reportViewerOptions.renderingBegin = onViewerRenderingBegin;
args.reportViewerOptions.renderingEnd = onViewerRenderingEnd;
}
function onViewerLoading(e, args) {
// e: jQuery event;
// args: IViewerPreLoadEventArgs ->
// reportViewerOptions: report viewer's options. Available options:
// reportSource: report viewer's report source.
// viewMode: report viewer's view mode.
// pageMode: report viewer's page mode.
setReportParameters(args.reportViewerOptions.reportSource);
setReportOptions(args.reportViewerOptions);
}
function setReportParameters(reportSource) {
if (reportSource.report === "Dashboard.trdp") {
reportSource.parameters = { ReportYear: 2003 };
}
}
function setReportOptions(reportViewerOptions) {
const report = reportViewerOptions.reportSource.report;
if (report === "Product Tag Report.trdp") {
reportViewerOptions.pageMode = telerikReportViewer.PageModes.CONTINUOUS_SCROLL;
reportViewerOptions.viewMode = telerikReportViewer.ViewModes.PRINT_PREVIEW;
} else if (report === "Product Catalog.trdp") {
reportViewerOptions.pageMode = telerikReportViewer.PageModes.SINGLE_PAGE;
reportViewerOptions.viewMode = telerikReportViewer.ViewModes.INTERACTIVE;
} else if (report === "Dashboard.trdp") {
reportViewerOptions.pageMode = telerikReportViewer.PageModes.CONTINUOUS_SCROLL;
reportViewerOptions.viewMode = telerikReportViewer.ViewModes.PRINT_PREVIEW;
} else if (report === "Report1.trdp") {
reportViewerOptions.viewMode = telerikReportViewer.ViewModes.PRINT_PREVIEW;
}
}
function onViewerRenderingBegin(e) {
console.log('TRV rendering begin.');
}
function onViewerRenderingEnd(e) {
console.log('TRV rendering end');
}
```
--------------------------------
### Sample Get Document Page Response (202 Accepted)
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/documents-api/get-document-page
Example response when the requested page is not yet ready. The 'pageReady' field indicates the status.
```json
{
"pageReady": false,
"pageNumber": 1
}
```
--------------------------------
### Install Telerik Reporting ODBC Drivers via CLI
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/datadirect-odbc-drivers
Use this command to install the 32-bit SQL Server and Oracle drivers to a specified path. The '/successToken' argument outputs 'OK' upon successful installation.
```powershell
/mode install /targetpath "C:\Program Files\Progress\Telerik Reporting ODBC Drivers" /platform x86 /drivers "SQLS,ORA" /successToken "OK"
```
--------------------------------
### Configure ReportServiceConfiguration as Singleton (.NET - C#)
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-service-report-source-resolver/how-to-implement-a-custom-report-source-resolver
Configure the ReportServiceConfiguration as a Singleton in the DI container for a .NET application. This example shows the start of the configuration, with the ReportingEngineConfiguration being initialized from appsettings.
```csharp
builder.Services.TryAddSingleton(sp =>
new ReportServiceConfiguration
{
// The default ReportingEngineConfiguration will be initialized from appsettings.json or appsettings.{EnvironmentName}.json:
```
--------------------------------
### Run Angular Application
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/display-reports-in-applications/web-application/native-angular-report-viewer/how-to-use-with-report-server
Start your Angular application using the 'start' script after all dependencies and configurations are in place. This command builds and serves your application.
```powershell
npm run start
```
--------------------------------
### Npgsql Connection String Example
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-npgsql-data-provider
Example of a connection string for Npgsql Data Provider to connect to a PostgreSQL database. Ensure all parameters are correctly set for your environment.
```sql
Server=127.0.0.1;Port=5432;Database=myDataBase;User Id=myUsername;Password=myPassword;
```
--------------------------------
### Sample Request for Get AI Response
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/features-api/get-ai-response
This sample demonstrates how to structure a POST request to the Get AI Response endpoint, including the necessary query.
```http
POST /api/reports/clients/4476c114dbb/instances/99834da5858/ai/57fc76d2cf8/query HTTP/1.1
{
"query": "Generate an executive summary of this report."
}
```
--------------------------------
### Sample Request to Get Report Parameters
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/report-parameters-api/get-report-parameters
This sample demonstrates how to send a POST request to the Get Report Parameters endpoint, including the report name and parameter values.
```http
POST /api/reports/clients/2c3d/parameters HTTP/1.1
{
"report": "MyReport1",
"parameterValues": {
"p1": "v1",
"p2": 20
},
}
```
--------------------------------
### Run Angular Application
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/display-reports-in-applications/web-application/native-angular-report-viewer/how-to-use-with-standalone-components
Start your Angular application using the `npm run start` script. This command compiles the application and serves it locally, allowing you to view the integrated report viewer.
```powershell
npm run start
```
--------------------------------
### Sample Get Document Info Request
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/documents-api/get-document-info
An example of a GET request to the Get Document Info endpoint with specific IDs.
```http
GET /api/reports/clients/2c3d/instances/4d3c/documents/5x3a/info HTTP/1.1
```
--------------------------------
### Get Document API Sample Request
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/documents-api/get-document
Example of a GET request to the Get Document API endpoint, specifying client, instance, and document identifiers.
```http
GET /api/reports/clients/2c3d/instances/4d3c/documents/5x3a HTTP/1.1
```
--------------------------------
### ExampleAttribute Constructor (with text)
Source: https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.expressions.exampleattribute
Initializes a new instance of the ExampleAttribute class with a specified text description.
```csharp
public ExampleAttribute(string text)
```
--------------------------------
### Get Document API Sample Response
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/documents-api/get-document
Example successful response for the Get Document API, indicating the document is downloaded as an attachment with its filename.
```http
HTTP/1.1 200 OK
Content-Disposition: attachment; filename=ProductCatalog.pdf
bytes
```
--------------------------------
### Configure Routing and Endpoints in Startup.cs
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/web-report-designer/how-to-set-up-in-dotnet
Ensure the `Configure` method in `Startup.cs` includes routing and endpoint configuration for API controllers.
```csharp
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
```
--------------------------------
### Create React App
Source: https://www.telerik.com/products/reporting/documentation/knowledge-base/how-to-use-web-report-designer-in-react-js
Initializes a new React application. Ensure Node.js (>= 6) and npm (>= 5.2) are installed.
```bash
npx create-react-app my-app
cd my-app
npm run start
```
--------------------------------
### Initialize Method - IStorageProvider
Source: https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.cache.interfaces.istorageprovider
Initializes the storage provider with configuration parameters. Pass a dictionary of settings to customize how storage instances are created.
```csharp
void Initialize(IDictionary parameters)
```
--------------------------------
### Get Document Resource Sample Request
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/documents-api/get-document-resource
Example of an HTTP GET request to retrieve a document resource. Replace placeholder IDs with actual values.
```http
GET /api/reports/clients/2c3d/instances/4d3c/documents/5x3a/resources/4t6d HTTP/1.1
```
--------------------------------
### ExampleAttribute Constructor (Default)
Source: https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.expressions.exampleattribute
Initializes a new instance of the ExampleAttribute class with default values.
```csharp
public ExampleAttribute()
```
--------------------------------
### Get Quarter of the Month with Quarter()
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/expressions/expressions-reference/functions/date-and-time-functions
Returns the quarter of the month component for a specified date. This example uses the Now() function to get the current date.
```Telerik Reporting Expressions
=Quarter (Now())
```
--------------------------------
### WebServiceDataSource Cookie Parameter Example
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/webservicedatasource-component/using-parameters-with-the-webservicedatasource-component
Cookie parameters are included in the request as a 'Cookie' Header. This example shows the parameter setup and the resulting Cookie Header in Fiddler.
```plaintext
Cookie: userId=12345; sessionID=ABCDEF
```
--------------------------------
### Initialize HTML5 Report Viewer with Report Server Configuration
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/display-reports-in-applications/web-application/html5-report-viewer/html5-report-viewer-with-report-server-net
Complete initialization example for the HTML5 Report Viewer, specifying the Report Server connection details and the report source with parameters.
```javascript
$"#reportViewer1"
.telerik_ReportViewer({
reportServer: {
url: "https://yourReportServerUrl:port",
getPersonalAccessToken: function() {
return Promise.resolve("");
}
},
reportSource: {
// The report value should contain the Category and ReportName in the following format
// {Category/ReportName}
report: "Samples/Dashboard",
parameters: {
ReportYear: 2004
}
}
});
```
--------------------------------
### Register Client Request and Response Sample
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/clients-api/register-client
Example of a POST request to register a client and the corresponding HTTP 200 OK response with the client ID.
```http
POST /api/reports/clients HTTP/1.1
```
```http
HTTP/1.1 200 OK
{"clientId": "a5f3"}
```
--------------------------------
### Initialize(IDictionary) Method
Source: https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.cache.interfaces.istorageprovider
Initializes the provider instance with parameters for configuring storage instances.
```APIDOC
## Method Initialize(IDictionary parameters)
### Description
Initializes the provider instance with parameters used to configure each newly created storage instance.
### Declaration
```csharp
void Initialize(IDictionary parameters)
```
### Parameters
#### Path Parameters
- **parameters** (IDictionary) - Required - Dictionary of name-value pairs representing storage configuration parameters.
```
--------------------------------
### Sample Get Document Info Response
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/documents-api/get-document-info
An example of a successful response (HTTP 202 Accepted) from the Get Document Info endpoint, indicating the document is still processing.
```json
HTTP/1.1 202 Accepted
{
"documentReady": false,
"PageCount": 2,
"DocumentMapAvailable": false,
}
```
--------------------------------
### Startup.cs Configuration for Telerik Reporting
Source: https://www.telerik.com/products/reporting/documentation/knowledge-base/adding-reporting-net-core-mvc
Configures services and the HTTP request pipeline in the Startup.cs file to integrate Telerik Reporting. This includes setting up dependency injection for IReportServiceConfiguration.
```csharp
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
services.AddControllers();
services.Configure(options =>
{
options.AllowSynchronousIO = true;
});
services.AddRazorPages().AddNewtonsoftJson();
// Configure dependencies for ReportsController.
services.TryAddSingleton(sp =>
new ReportServiceConfiguration
{
ReportingEngineConfiguration = ConfigurationHelper.ResolveConfiguration(sp.GetService()),
HostAppId = "ReportingCore3App",
Storage = new FileStorage(),
ReportResolver = new ReportFileResolver(
System.IO.Path.Combine(sp.GetService().ContentRootPath, "Reports"))
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
}
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
});
}
}
```
--------------------------------
### WebServiceDataSource Header Parameter Example
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/webservicedatasource-component/using-parameters-with-the-webservicedatasource-component
Header parameters are included in the request with the parameter name as the Header Name and the parameter value as the Header Value. This example shows the setup and the resulting request header.
```plaintext
Header: headerParameter=MyHeader
```
--------------------------------
### Enable WebAPI Controllers in Startup.cs
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/web-report-designer/how-to-set-up-in-dotnet
Configure the `ConfigureServices` method in `Startup.cs` to enable WebAPI controller support for the Web Report Designer Service.
```csharp
services.AddControllers();
```
--------------------------------
### Get Version
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/general-api/get-version
Retrieves the version of the Telerik Reporting REST Service. This endpoint is marked as obsolete starting with the 2025 Q2 release.
```APIDOC
## GET /api/reports/version
### Description
Retrieves the version of the Telerik Reporting REST Service.
### Method
GET
### Endpoint
/api/reports/version
### Response
#### Success Response (200)
- **string** - The Version of the Telerik Reporting REST Service retrieved successfully.
### Request Example
```
GET /api/reports/version HTTP/1.1
```
### Response Example
```
HTTP/1.1 200 OK
"20.0.26.424"
```
```
--------------------------------
### Run React Application
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/display-reports-in-applications/web-application/react-report-viewer/how-to-use-react-report-viewer-with-report-server
Start the React development server to view your application with the integrated report viewer.
```powershell
npm start
```
--------------------------------
### Initialize Method
Source: https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.openxmlrendering.spreadsheet.spreadsheetreport
Initializes the current extension with default settings. This method is part of the IExtension interface.
```csharp
public virtual void Initialize(Hashtable deviceInfo)
```
--------------------------------
### Get Version API Request
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/general-api/get-version
Use this endpoint to retrieve the version of the Telerik Reporting REST Service. This endpoint is obsolete starting with version 19.1.25.521.
```http
GET /api/reports/version
```
```http
GET /api/reports/version HTTP/1.1
```
--------------------------------
### Get Document Resource Sample Response
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-api-reference/documents-api/get-document-resource
Example of a successful HTTP response (200 OK) when retrieving a document resource. The body contains the resource file content.
```http
HTTP/1.1 200 OK
file-content
```
--------------------------------
### Complete HTML Structure for Report Viewer
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/display-reports-in-applications/web-application/html5-report-viewer/manual-setup
This is a full HTML document example demonstrating the integration of the report viewer, including necessary meta tags, Kendo UI theme, custom styles, the viewer placeholder, and the initialization script.
```html
Telerik HTML5 Report Viewer
loading...
```
--------------------------------
### Configure CubeDataSource with Connection String and SelectCommand (C#)
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/cubedatasource-component/selecting-data-from-an-olap-cube-with-the-cubedatasource-component
Demonstrates how to instantiate a CubeDataSource, set its ConnectionString, and assign an MDX query to the SelectCommand property in C#.
```csharp
Telerik.Reporting.CubeDataSource cubeDataSource = new Telerik.Reporting.CubeDataSource();
cubeDataSource.ConnectionString = "MyAdventureWorksDW";
cubeDataSource.SelectCommand = "select non empty { [Measures].[Sales Amount] } on columns, " +
" non empty { [Product].[Category].[Category] * " +
" [Product].[Subcategory].[Subcategory] } on rows " +
"from [Adventure Works]";
```
--------------------------------
### EntityDataSource Setup with Connection String in C#
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/entitydatasource-component/configuring-the-database-connectivity-with-the-entitydatasource-component
This C# example configures the EntityDataSource component by explicitly setting the ConnectionString property, along with the Context and ContextMember. This is useful when the connection string is not implicitly available.
```csharp
Telerik.Reporting.EntityDataSource entityDataSource = new Telerik.Reporting.EntityDataSource();
entityDataSource.ConnectionString = "AdventureWorksConnection";
entityDataSource.Context = typeof(AdventureWorksEntities);
entityDataSource.ContextMember = "Products";
```
--------------------------------
### Get Crystal Reports Assembly Version with gacutil
Source: https://www.telerik.com/products/reporting/documentation/importing-reports/crystal-reports-converter
Use the gacutil.exe command-line tool to list the version of Crystal Reports assemblies installed in the Global Assembly Cache (GAC). This information is crucial for configuring binding redirects.
```powershell
C:\WINDOWS\system32>gacutil -l CrystalDecisions.Shared
Microsoft (R).NET Global Assembly Cache Utility. Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
CrystalDecisions.Shared, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
```
--------------------------------
### Configure ReportServiceConfiguration from App Config
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/servicestack-implementation/add-rest-servicestack-to-web-application
This C# example shows how to configure the Telerik Reporting REST service by referencing the application configuration file. This approach simplifies setup by externalizing configuration details. Ensure the 'ReportServiceConfiguration' section is correctly defined in your web.config.
```csharp
public class ReportsHost : Telerik.Reporting.Services.ServiceStack.ReportsHostBase
{
public ReportsHost()
{
var reportServiceConfiguration = new Telerik.Reporting.Services.ConfigSectionReportServiceConfiguration();
this.ReportServiceConfiguration = reportServiceConfiguration;
}
}
```
--------------------------------
### Run Development Server
Source: https://www.telerik.com/products/reporting/documentation/knowledge-base/how-to-use-viewer-and-designer-in-vue
Start the Vue.js development server to view your application with the integrated reporting components. This command builds and serves the application locally.
```powershell
npm run dev
```
--------------------------------
### PreviewDataInfo Constructor
Source: https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.data.schema.previewdatainfo
Initializes a new instance of the PreviewDataInfo class. No specific setup is required before calling this constructor.
```csharp
public PreviewDataInfo()
```
--------------------------------
### Example of Evaluated Embedded Expression
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/expressions/using-expressions/embedded-expressions
This example shows the expected output after the embedded expressions in the string are evaluated.
```plaintext
Hi Mr. Smith, John!
```
--------------------------------
### Configure RedisStorage in .NET 8+ Services
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/rest-service-storage/how-to-use-redis-storage
Demonstrates how to register `RedisStorage` as a singleton service in a .NET 8+ application using `TryAddSingleton`.
```csharp
builder.Services.TryAddSingleton(sp =>
new ReportServiceConfiguration
{
HostAppId = "Application1",
Storage = new Telerik.Reporting.Cache.StackExchangeRedis.RedisStorage(ConnectionMultiplexer.Connect("localhost")),
ReportSourceResolver = new TypeReportSourceResolver()
.AddFallbackResolver(new UriReportSourceResolver(reportsPath))
});
```
--------------------------------
### Successful Response Example
Source: https://www.telerik.com/products/reporting/documentation/knowledge-base/test-web-report-designer-service
This is an example of a successful response from the 'api/reportdesigner/cultureContext' endpoint, showing the decimal and list separators for the current culture.
```json
{"decimalSeparator":".","listSeparator":","}
```
--------------------------------
### Sample Dockerfile for Windows Container
Source: https://www.telerik.com/products/reporting/documentation/getting-started/installation/dot-net-core-support
A sample Dockerfile snippet for a Windows container using the .NET ASP.NET runtime. Ensure the base image supports GDI+ for System.Drawing.
```dockerfile
FROM mcr.microsoft.com/dotnet/aspnet:8.0-windowsservercore-ltsc2022 AS base
WORKDIR /app
EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:windowsservercore-ltsc2022 AS build
# ...
```
--------------------------------
### SQLite Connection String Example
Source: https://www.telerik.com/products/reporting/documentation/knowledge-base/integrate-sqlite-databases-telerik-web-report-designer
Use this connection string to test the data connection to a local SQLite database file. Ensure the database file is in the project's root directory.
```plaintext
Data Source=northwind.db;Version=3;FailIfMissing=True;
```
--------------------------------
### Initialize AIClientInfo
Source: https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.services.engine.aiclientinfo
Default constructor for the AIClientInfo class.
```csharp
public AIClientInfo()
```
--------------------------------
### Example XML Report Definition
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/program-the-report-definition/serialize-report-definition-in-xml
This is an example of an XML file that defines a Telerik Report, including data sources and report items.
```xml
```
--------------------------------
### Install SkiaSharp Dependencies on Ubuntu/Debian
Source: https://www.telerik.com/products/reporting/documentation/getting-started/installation/dot-net-core-support
Install required libraries for SkiaSharp on Ubuntu or Debian-based Linux systems. These are necessary for the SkiaSharp graphics engine.
```bash
sudo apt-get update
sudo apt-get install -y libfreetype6
sudo apt-get install -y libfontconfig1
```
--------------------------------
### Minimal OpenAccessDataSource Setup in C#
Source: https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/openaccessdatasource-component/configuring-the-database-connectivity-with-the-openaccessdatasource-component
This code sets up the OpenAccessDataSource with an ObjectContext and member, suitable for production environments where the connection string is configured elsewhere.
```csharp
var openAccessDataSource = new Telerik.Reporting.OpenAccessDataSource();
openAccessDataSource.ObjectContext = typeof(AdventureWorksEntities);
openAccessDataSource.ObjectContextMember = "Products";
var report = new Report1();
report.DataSource = openAccessDataSource;
```
--------------------------------
### Initialize HTML5 Report Viewer with Custom Template and Ready Event
Source: https://www.telerik.com/products/reporting/documentation/embedding-reports/display-reports-in-applications/web-application/html5-report-viewer/customizing/styling-and-appearance/providing-custom-templates
This example shows how to initialize the HTML5 Report Viewer with a custom template and includes a `ready` event handler. The `ready` event fires when the viewer is fully loaded and functional after the template has been successfully applied.
```javascript
$"#reportViewer1".telerik_ReportViewer({
serviceUrl: "api/reports/",
templateUrl: '/custom-template-directory/telerikReportViewerTemplate.html',
reportSource: {
report: "Product Catalog.trdp"
},
ready: function() {
// report viewer is now ready for action
}
});
```