About three years ago, we added a new special component called Transports. They enable to save built reports to the cloud, as well as use files in the cloud (for example, pictures) to build reports.
Until now, there were 4 cloud transports: Dropbox, Google Drive, Box, OneDrive, and 2 non-cloud transports: Email and FTP. You can read how to set up cloud transports here and how to use files from the cloud here.
This article tells how to add a fifth cloud transport: Yandex Disk. Let's look at all setup nuances with a detailed description of the features.
If you have already worked with our cloud transport, then you can skip directly to the chapter telling how to set up the connection.
Adding transport to the application and setting it up
First, as with other transports, you need to add the corresponding component from the “FastReport VCL Internet transports” tab.
You can use the context menu on the component. This will establish a connection directly from the development environment. Click on the “Edit connection” submenu.
By default, transports respond only to the authorization response from the browser using port 9898. If this port is already used or you plan to use this port in the future, then FastReport VCL enables you to change the port in the ListenerPort property.
Important! The user does not need to do all of the following steps every time to authorize. This setup is done only once by the cloud administrator. After completing all the steps, the obtained authorization data can be used by other users.
Connecting to Yandex Disk
When a user wants to open or save to a file using a transport, he will see a standard authorization dialog (if he has not logged in earlier).
To go to the connection settings page, click on the question mark in the upper right of the authorization window. After that, the default browser will open with the access page for external Yandex Drive applications. If the user is not authorized in Yandex, an authorization page will open, where you will need to log into your Yandex account.
Click on «Create new client».
Enter the name of the application and go down below.
In the "Platforms" item, select "Web-services", specify "http://localhost:9898" in the "Callback URI" field, and then click "Add".
Note that the port must match the port specified in the ListenerPort property of the transport component.
The list of possible accesses is quite long, so we have hidden most of them in the picture below.
Open the item "Yandex.Disk REST API" and check the boxes next to "Writing in any place on Yandex.Disk" and "Read all of Yandex.Disk".
Then go down to the very bottom and click "Create app".
You will see that the application has been created. Copy the fields "ID" and "Password".
Paste them into the corresponding input fields of the FastReport VCL authorization dialog.
Click “Ok”. A new window should open in the default browser. The screen prompts you to select an account for authorization.
Once the account is selected, you can close the browser window.
If the connection is successful, you will see the standard FastReport VCL file browser.
On this screenshot you can see unicode support verification.
We consider transports an important part of our product and are going to constantly increase their number, but we create transports according to your requests as demand creates supply. If you have any suggestions, then you can contact our support.