Adding a Font to the Resource

A custom font can be embedded into the report as a resource, so it travels with the template.

Changing the Designer Theme

The report designer is available as a React component too, and it also supports themes. This example applies a theme to the designer.

Changing the Viewer Theme

The viewer supports many visual themes, selected through options. This example applies a theme to the React viewer component.

Creating a new Data Connection from code

A report can be connected to a data source entirely from code, without editing the template dictionary.

Creating Report at Runtime

Build the report in React from code by creating its structure and configuring the required components.

Customizing the Designer

Embed the report designer in React, load a template, and connect its editing and save actions.

Customizing the Viewer

The viewer's toolbar and export options can be trimmed to expose only the features you want. This example hides the Open button and the PDF export.

Exporting a Report from Code with Changing Export Settings

Export output can be tuned through a settings object. This example exports to PDF while adjusting metadata, font embedding and a user password.

Exporting a Report to HTML

Render the report in React and export it directly from code, without opening the viewer.

Exporting a Report to PDF

Render the report in React and export it directly from code, without opening the viewer.

Exporting Many Files to Single PDF

Render the report in React and export it directly from code, without opening the viewer.

Get a modified Report from the Designer

When the user changes the report in the designer (for example creates a new one), the designer assigns a new report object.

Globalizing Report

A report can be rendered for a specific culture, formatting numbers, dates and localized text accordingly.

How to Activate the Product

The product license is applied from code before any report is used. This example shows where to set the license key or load it from a file.

Localizing the Designer

The designer can offer several interface languages and pick a default. This example adds localization files to the menu with different load options.

Localizing the Viewer

Set up the report viewer in React, load a template, and connect the component to the application.

Printing the Report from Code

Render the report in React and start the print workflow with settings supplied by the application.

Registering Data from Code

Instead of a database connection, you can pass an in-memory DataSet directly to the report.

Rendering a Report from Code

A report can be rendered without a viewer, for example to process the result server-side. This example renders the report and inspects the output.

Showing a Report in the Viewer without Toolbar

Reports.JS provides ready-made React components in the stimulsoft-reports-js-react package, so you embed the viewer as a JSX element.

Supply Custom Headers for JSON Database

When a JSON data source is served by a protected backend, you can attach custom HTTP headers to each data request.

Using a Custom Data Adapter

You can register a fully custom data source that supplies schema and data from your own code.

Using a Custom Font

Fonts can also be supplied to the whole engine rather than stored in the report. This example registers a TTF file with the global font collection.

Using Designer Events

The React designer raises events for creating, saving, previewing and exiting a report.

Using Parameters in SQL Query

SQL query parameters can be substituted with real values at run time. This example replaces a parameter value just before the data is fetched.

Using Report Variables in Code

Report variables can be assigned from code before rendering, which is handy for passing application state into a template.

Using SQL Data Sources

The connection string and SQL query of a report can be changed dynamically from code. This example swaps both when the report requests its data.

Using the Right-To-Left Mode in the Viewer

For right-to-left languages such as Arabic or Hebrew, the viewer interface can be mirrored. This example enables RTL mode.

Using the two Viewer in the One Project

Because the viewer is just a React component, you can place several instances on one page. This example shows two independent viewers side by side.

Using Viewer Events

The React viewer exposes events as component props. This example handles the e-mail event, which fires when the user sends a report from the toolbar.

Working with onDesign and onExit Events

This example combines the viewer and the designer, switching between them with React state.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.