Publishing Reports in Stimulsoft

Publishing reports means saving them as separate projects or files to simplify and speed up the process of embedding these reports into an application on different platforms. The report is published using a wizard that can be called by clicking the Publish button on the Ribbon panel of the designer, or by selecting this command from the File menu:

After calling the wizard, you need to specify the platform for which the report will be published.

Information. Depending on the selected platform, the number of parameters may vary.

Publishing Settings

As it is already mentioned, the number of parameters can vary depending on the selected platform. Consider the parameters of the wizard when publishing report for the JavaScript as an example.

1. The option for selecting the type of the report deployment:

  • Project. The report will be saved as a project to run it in the development environment or embed it into the application.

2. The option for selecting a framework type. You can select a JavaScript application without using a framework, or select the Node.js framework.

3. The option to load a report from:

  • File;

On some platforms, you can also load a report from:

  • Stream,

4. The option for selecting an action with a report, after it is published:

  • Show. The project will be created for viewing the report. When you run the project, the report viewer is called with this report. Also, when you select a Web platform for publishing, you can enable the report to be displayed in the full browser window.

Information If there are data sources and parameters (variables) in the report, then when you select any action, you should specify the data connection parameters:

  • Use Connection from Report. If the connection is present in the report, then it will be used when the project is run.

If the report uses file data sources (XML or JSON), then, instead of the Replace Connection String option, the Replace Path to Data parameter will be present. Using it you can specify a new path to the data files.

  • Register Data from Code. Select this option if you want to use data from XML, JSON sources or from Business objects. If you select this item, you can also enable the following options:

Synchronize Report Dictionary. Use this option to synchronize the registered data in the data storage and in the data dictionary of the report.

Use Only for Report Preview. Select this option to use the data only for preview.

In addition, the data dictionary can contain variables. When you select the Show or Export action, you can define a value for each variable:

  • Use Value from Report. The value of the variable will remain as the default.

5. Options that depend on the selected action. In this case, the Show action is selected, so the Display the Viewer in Full Browser Window option is available.

6. Include License Key. If this option is not enabled, the report will be displayed with the Trial watermark. If you enable this option, you can connect the license key in one of the following ways:

  • String;

7. Include Localization. This option is relevant only for the Show and Design actions. When this option is enabled, select the interface of the viewer localization if the Show action is selected, or the designer, if the Design action is selected.

8. Include UI Theme. This option is relevant only for the Show and Design actions. When this option is enabled, you can specify the theme of the layout of the viewer interface, if the Show action is selected, or the designer, if the Design action is selected.

9. Use Compressed Scripts. If you enable this option on, the size of the scripts will significantly decrease but when you run the application it will take time to unpack them.

10. The Hide Options button is used to expand and collapse the options bar in the publish wizard.

11. The Save Project Package button. When you click this button, a dialog box will be displayed to specify the location of the project or standalone application. Note, when saving a project, it will be saved as a zip archive.

12. The Close button can be used to close the Publish wizard.

13. The field in which the current project code is displayed. Also in this field, you can find the Copy button, with which you can copy the code to the clipboard.

Information. On some platforms, the Get Stimulsoft Libraries from NuGet option may be present. In this case, when the project is run, if there are no Stimulsoft libraries in it, they will be automatically loaded from the NuGet repository.

For the Java platform you can find the Get Stimulsoft Libraries from Maven option.

Publishing report step by step

Step 1: Run the report designer.

Step 2: Create a report or open it.

Step 3: Save the last changes.

Step 4: Call the Publish wizard by clicking the Publish button on the Ribbon panel or by clicking Publish from the File menu.

Step 5: Select the platform for which the report will be published. The following platforms are available ASP.NET, ASP.NET MVC, .NET Core, WinForms, WPF, JavaScript, PHP, Java.

Step 6: Specify the publishing settings for the selected platform.

Step 7: Click the Save Project Package button and specify the location where the project should be saved.

Step 8: Unpack the archive, if the package is saved as a project. Open the .sln file with Visual Studio or another development environment.

Step 9: Make changes in the project code, if necessary.

Step 10: Run the project.