New NextCloud transport in FastReport VCL

New NextCloud transport in FastReport VCL

More than 5 years ago we added new special components—"Transports." They help save generated reports to the cloud and use files (for example, pictures) located in the cloud to build reports.

With the release of 2023.3, we added a ninth to the eight existing transports for working with NextCloud. You can find more articles about connecting transports here.

This article will look at the settings for NextCloud and analyze some features. If you have already worked with our transports, then you can go straight to the chapter with connection setup.

Adding transport to the application and its setup

In the first step, as with other transports, add the appropriate component from the "FastReport VCL Internet transports” tab.

Adding a component to a form

You can use the context menu on a component. This will establish the connection directly from the development environment. Click on the “Edit connection” submenu.

Calling the transport context menu

By default, transports respond only to an authorization response from the browser using port 9898. If this port is already occupied or you plan to use this port in the future, FastReport VCL allows you to change the port in the ListenerPort property.

Transport in the Object Inspector

In what follows, we will assume that port 9898 is used by default.

Important! The user does not need to perform all of the following steps each time to authorize. This setting is performed only once by the cloud service administrator. After completing all the steps, the received authorization data can be used by other users.

Connecting to NextCloud

When you need to open or save a file using a transport, you will have access to the following standard authorization dialog (if there hasn't been authorization before).

Standard authorization dialog

The button with a question mark will take you to the NextCloud documentation page. First, you need to create an OAuth client on your server. Open NextCloud in your browser and click on the profile button. Then click on “Settings” in the drop-down list.

Profile button drop-down list

Select “Security” in the settings menu.

Settings menu

Enter the client’s name and specify “http://localhost:9898” in the “Redirection URI” field, then click the “Add” button.

Please note that the port must match the port specified in the ListenerPort property of the transport component.

Client creation form

At this point, you will see that the application has been created successfully. Copy the “Client Identifier” and “Secret” fields as in the screenshot below.

Result of client creation

Paste the copied data into the corresponding input fields that are required in the FastReport VCL authorization dialog box.

Standard authorization dialog with hidden data

Click “OK”. A new window should open in your default browser. An authorization prompt will appear on the screen.

NextCloud authorization

After authorization, you will be prompted to share access with the application.

NextCloud Access Request

After which you can close the browser window.

Message about the end of authorization

If the connection is successful, you will see the standard FastReport VCL file browser.

Standard file browser FastReport VCL

Now it remains to check the uploaded file in NextCloud.

NextCloud content in the browser

This completes the connection setup successfully. Now you know how to connect to NextCloud in FastReport VCL.

If you have Linux, you can test the new transport without registering but by deploying the NextCloud server on your machine.

Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314

© 1998-2024 Fast Reports Inc.
Trustpilot