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.
Important! For the HTTPS protocol to function properly, the following OpenSSL libraries are required: libssl-3.dll and libcrypto-3.dll. These libraries can be found in the directory with the main demo application. They need to be copied to the application's folder or the system directory.
In the first step, as with other transports, add the appropriate component from the "FastReport VCL Internet transports” tab.
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.
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.
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.
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).
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.
Select “Security” in the 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.
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.
Paste the copied data into the corresponding input fields that are required in the FastReport VCL authorization dialog box.
Click “OK”. A new window should open in your default browser. An authorization prompt will appear on the screen.
After authorization, you will be prompted to share access with the application.
After which you can close the browser window.
If the connection is successful, you will see the standard FastReport VCL file browser.
Now it remains to check the uploaded file in NextCloud.
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.