Introduction
Interactive (IA) reports are the current report version in RK7. When the installer is used, they can be configured as part of the process.
The operation requires MS SQL Server 2012 and higher.
To work with IA reports, the user should have the relevant restaurant specified in the Current restaurant field.
Server interaction schematic diagram
Interactive reports are installed with the use of r_keeper_7 installer.
For operation purposes, IA reports require the following:
Important: if an SQL Server client is not installed on your local PC, the report function server will be unavailable for selection in the installer!
Before the RecalcInvalidShifts parameter addition, the Feature Server did not recalculate broken shifts. Now, if the shift is repaired, broken shifts will be recalculated with this parameter enabled within the time interval specified in the FastControlDays parameter. If the shift remains broken after FastControlDays, it will not be recalculated again.
Installation Procedure
"Next" (see Fig. 1).
Fig. 1. Selection between installation and deletion of already installed components
Fig. 2. Selection of installation folder and entering the name of the instance
Note: you should mandatorily select "UCS CommonServer", "Report function server" and "Reports plugin". If a Common Server has already been installed on the PC, you can use it.
Pay attention to the "Manager station" item. When it is selected, a new manager station instance will be created with a configured plugin.
If you selected this item, go to step 6, if not — to step 7.
Fig. 3. Component selection for installation
Fig. 4. Entering the directories server network name
Important: the report function server port should be unique; it is also recommended to specify a port, different from 8888.
Fig. 5. Entering the report function server address and ports
Fig. 6. Entering the report function server external address and ports
Note: this event happens if you select UCS CommonServer during the installation.
Fig. 7. Address and port of the created CommonServer
Fig. 8. Certificate selection
The plugin log file is created automatically in \bin\win\Logs\plugins\SchRepPluginClient\log\schRepPlugin.txt. The file location should not be changed.
The FS server log file is created automatically in the *Logs\ directory of the FS server. The file location should not be changed.
Fig. 9. Logging level selection
Note: during initial startup, it is recommended to launch servers as applications.
Fig. 10. Selecting components to be installed as services
Fig. 11. Connecting to MS SQL server
Fig. 12. SQL database name
Fig. 13. Selecting applications requiring shortcut creation on the desktop
Fig. 14. Launching the installation process
Fig. 15. Installation completion
Fig. 16. CS launched as a service
Fig. 16a. CS launched as an application
Important: when changing the FS version, the aggregates version does not always change, so aggregates may not be recalculated when switching to the new Feature version. It is also recommended to keep aggregate DBs. If you transfer the DB to another server, you should transfer aggregate DBs as well, or downgrade the version of aggregates in the database (for test DBs only).
Fig. 17. IR Report Server
Description of INI Files
Below, you can see the minimum required set of parameters; if you have specified additional parameters, do not delete them.
CS_Service.ini — CommonServer configuration file
[CS_CONNECTION]
connect_timeout(s)=30
receive_timeout(s)=30
send_timeout(s)=30
compression=c_Base64_ZLib
def_port=7007
SSL_port=7007
db_path=C:\Program Files (x86)\UCS\CommonServerRK7IR\RK7_IR\UCS.csdb
[CS]
Name=CS_RK7_IR
loglevel=3
Log_level=3
i_guid={C7BB200D-C644-4743-BEA9-D93EB518EDFF}
certificate_path=C:\Program Files (x86)\UCS\CommonServerRK7IR\RK7_IR\
Root_Cert_File=ca.cer
Cert_File=work.cer
Key_File=work.key
Main parameters description
[CS_CONNECTION] section
Timeouts in seconds. In case of large databases (10 GB and larger), it is recommended to set high values (30,000 to 50,000).
FeatureServPrj.ini — FS server configuration file
FS server configuration file
[FS_CONNECTION]
ConnectTimeout=50000
ReceiveTimeout=50000
SendTimeout=50000
CommandTimeOut=50000
SessionTimeOut=50000
url=http://127.0.0.1:7777/soap/IStructuresInfo
start_port=7777
DB_Connect_Count=10
[CS_CONNECTION]
// address and port of the PC running the CS_Service
url=http://127.0.0.1:7007/soap/UCSCommonWS
[FS_TYPE]
i_Guid={F4DED846-8913-4F1D-B5B5-5699CAC45DA9}
instance_name=fsRK7_2
MasterServer=1
connection_string=Provider=SQLNCLI11.1;Persist Security Info=True;Initial Catalog=rk7_5_3_Z;Data Source=127.0.0.1,1433
MainLang=FeatureServPrj.rus
[FS_MAILING]
Mailing=0
[RPL_PARAM]
url =http://121.10.10.111:8892/soap/IStructuresInfo
start_port = 8892
[FS_AGREGATE]
Agregate=1
Count_shifts=10
Time_between_recalc=0Time_between_checking=10
WaitConnectionInterval=5
Parameters description
[FS_CONNECTION] section
Timeouts in seconds. In case of large databases (10 GB and larger), it is recommended to set high values (30,000 to 50,000).
[CS_CONNECTION] section
[FS_TYPE] section
[FS_MAILING] section
[RPL_PARAM] section
Note: URL in all microserver settings (not only this feature) is the feedback address, controlling its visibility for the Common Server. Any Feature Server should use this address to register at the CS.
start_port — is the port on the PC, occupied by the selected Feature. Since the network may use port forwarding, the startport can be different from the port specified in the URL parameter.
[FS_AGREGATE] section
Agregate=1 // 1 — enable aggregates, 0 = disable
Count_shifts=10 // the number of shifts to be recalculated during the next checkой проверке
Time_between_recalc=0 // the time between recalculations of the aggregates (in minutes)
Time_between_checking=10 // the time of aggregates relevance check after the latest successful recalculation of aggregates
WaitConnectionInterval=5 // connection timeout, in minutes (added if necessary, starting from FS 1.24.1.0).
Note: starting from the FS 1.24.1.0, it became possible to restore an interrupted database connection. By default, a time interval between database re-connection attempts is set to 1 minute. If it is necessary to increase this time, add the WaitConnectionInterval parameter to the [FS_AGREGATE] section of FS ini file. This parameter sets the time in minutes for the service to wait before trying to re-connect to the database in case of connection failure.
SchRepPluginClient.ini — the plugin configuration file
Plugin configuration file (\\rk7_5_3_Z\bin\win\plugins\SchRepPluginClient\SchRepPluginClient.ini)
[CS_CONNECTION]
url = http://127.0.0.1:7007/soap/UCSCommonW
fs_guid = {F4DED846-8913-4F1D-B5B5-5699CAC45DA9}
ConnectTimeout = 300000
ReceiveTimeout = 300000
SendTimeout= 300000
[CL_TYPE]
i_Guid={0DA2E90B-C4CA-46D1-80E0-E26A076B4042}
Parameters description
[CS_CONNECTION] section
[CL_TYPE] section
Launching reports in RK7MAN
Login to the manager station.
If you see the "You are not authorized" error upon login, make sure that the SQL database has r_keeper_7 directories. If not, check the SQL communication settings and repeat the export.
In the upper menu, you will see the "IR reports" section with links to reports, and in the "Extensions" section — additional settings for IA reports.
Fig. 32. IA reports directory
Configuring reports for a restaurant chain
Below, you can see the scheme of report implementation via the plugin for multiple restaurants.
Fig. 33. Configuration for a restaurant chain
FS connects to the database (the communication with SQL is specified in FeatureServPrj.ini), and registers its GUID at the CS. Consequently, you can configure a separate FS for each SQL DB (or each point, whether local or central). The FS functionality is vast enough; it can work without plugins, e.g. in the report mailing mode. All FS will register at the same CS.
The RK7 plugin connects to FS via CS. The plugin can interact with one FS only. Each plugin will connect to CS and search for the required FS by GUID. CS may be single, and it can work with multiple FS.
If you need to display at point A the data (IA reports) from point B, you should reconfigure the plugin at point A for FS at point B (line N in Fig. 34). Alternatively, you can reconfigure FS at point A for the DB at point B (change the SQL DB communication parameter in the FS INI file).
Fig. 34. Connection variants for the IA reports plugin
Hiding a restaurant from the report filter.
This list is created via an SQL request in the parameter settings.
Troubleshooting
Connection issues
Error: You are not authorized
19.12.2019 17:22:01.743>
[LOG]User entered incorrrectly
19.12.2019 17:22:02.080>
[LOG]You are not authorized
19.12.2019 17:22:12.893> [LOG]After registration: code 2, Server re-registration
19.12.2019 17:22:28.217> [LOG]After registration: code 2, Server re-registration
Reason: In the Feature Server connection settings, no database user is specified.
Solution: Open the IRReportsFSPrj.ini file, and in the connection_string field, specify the correct connection string with a username and a password. Example:
connection_string=Provider=SQLOLEDB.1;Password=1;Persist Security Info=True;User ID=sa;Initial Catalog=7171848;Data Source=127.0.0.1
Error: Invalid PLG_EMPLOYEEROLES object name
Reason: Feature Server has not created the table PLG_EMPLOYEEROLES
Solution: Use the script attached to the article. Do not forget to specify your database name in the script.
Issues concerning SQL collation
"Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Lithuanian_CI_AS" in the equal to operation".
As a result, some IA reports may become non-functional. As a solution, check the sorting settings of the SQL server and the DB itself (Fig. 34). After that, re-create the STAT aggregate databases.
In order to re-create the aggregate DBs, proceed as follows:
1. Stop the FS.
2. UPDATE [dbo].[DBInformation] set [DBVer]=0 where [Alias] = 'Agregates'
3. Delete all aggregate DBs (STAT)
4. Launch the FS.
Fig. 35. Database properties — sorting parameters
Issues when importing the report from an XML file
If problems of such kind arise, the error may read as follows: "Could not find stored procedure 'RPL8_GET_CURRENT_DATABASE_GUID"
The issue is related to the absence of certain tables and procedures. You should perform the following scripts:
USE [RK7]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RPL8_TRANSACT](
[ID_INC] [int] IDENTITY(1,1) NOT NULL,
[GUID] [uniqueidentifier] NOT NULL,
[SERVER_GUID] [uniqueidentifier] NOT NULL,
[DTS] [datetime] NULL
) ON [PRIMARY]
GO
CREATE PROCEDURE [dbo].[RPL8_GET_CURRENT_DATABASE_GUID]
(@SRVGUID uniqueidentifier OUTPUT )
AS BEGIN
SET @SRVGUID = NEWID()
END
GO
Configuring interactive reports Device communication