Save an analysis as a cockpit (HTML) (Profit Communication Center)

You can generate an analysis via the Profit Communication Center, using a commandline. Here, the output is saved locally (on your own PC or network). So you can save the analysis locally as an html page, just like publishing a cockpit in InSite. However, you can also perform other actions, such as exporting data to CSV. The latter is done a lot by partners and experts. The CSV can be used for external applications, or you can import it back into Profit via AFAS Remote.

Example:

You have created the Sales analysis in Profit.

Using the Profit Communication Center, you can publish this analysis as a cockpit to the location C:\Cockpits\Sales.htm every night. This means that you can immediately view this cockpit the next day.

Contents

  • Before you start
  • Configuring, testing, linking the Profit Communication Center (PCC)
  • administration filter
  • Publishing the Social analysis
  • Publishing the Occupancy analysis
Before you start

You use the Profit Communication Centre on your own system or an application server and the cockpit is saved locally.

Preparations:

  • You must meet the system requirements of the PCC.
  • Install and configure the PCC

    Installation on a terminal server is not supported by AFAS, we mention the following for your information.

    An administrator can install the Profit Communication Centre (PCC) on a terminal server so that all users can use the PCC via the terminal server. Users do not need to install the PCC. However, each each user must log in to the terminal server and download and run their personal settings.

    Installing an update:

    In case of a new Profit Version, you must reinstall the PCC. It is not required to first uninstall the old PCC (corresponding to the previous Update).

    The administrator installs the PCC on the terminal server. The user settings of the old installation are automatically taken over, users do not need to reconnect the environment(s).

    Note:

    The administrator does not have to adjust the Profit configuration.

    Wait until your environments have been converted to the next version. Once this has been done, all users install the PCC (see the method below).

    1. Log on to the terminal server.
    2. If a new installation has been found, you can update this automatically. If automatic updating is disabled or does not work for some other reason, use the following steps:
      1. Go to: General / User / Communication Center / Save installation.
      2. Run the PccSetup installation file (for all users).
      3. Make sure, that the PCC is started automatically when a user logs in to the terminal server.

    New installation for administrator and users:

    Use this procedure if you have not yet installed the PCC on the terminal server.

    The administrator installs the PCC. Each user must download and install their own settings.

    Installation on terminal server by administrator:

    1. Log on to the terminal server.
    2. Go to: General / User / Communication Center / Save installation.
    3. Run the PccSetup installation file (for all users).
    4. Make sure, that the PCC is started automatically when a user logs in to the terminal server.

    Installation for each user:

    1. The user logs in to the terminal server.
    2. Open the environment you want to use in conjunction with the PCC.
    3. Go to: General / User / Communication Center / Save settings.
    4. Save the file.
    5. Run the Settings.poci file.

    Create shortcut per user:

    1. When a user logs in to the terminal server, Profit Communication Center will be started automatically. If this is not desired, create a shortcut per user.
    2. Log in to the terminal server as administrator.
    3. Open the folder:

      C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup.

    4. Delete the Profit Communication Center shortcut. This will no longer automatically load the Profit Communication Center per user.
    5. For each user where Profit Communication Center does need to be started automatically, include a shortcut in the following folder:

      C:\Users\[gebruikersnaam]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

      This shortcut should point to the following file:

      C:\Program Files (x86)\AFAS Software\Profit Communication Center\Profit communication center.exe

    Install the PCC on the system (the application server) you use for publishing the cockpit.

  • Install Microsoft Excel

    Install a supported version of Microsoft Excel on the system (the application server) that you use for publishing the cockpit.

Points of attention:

  • Microsoft Excel must be installed on the application server on which you run the commandline.
  • The Windows user starting the task must log in to the server and then lock the machine (Windows button + L). This is because the task must be ‘attended’.
  • If you use Windows Task Scheduler, the ‘Run only when user is logged on’ setting should be enabled.
Configuring, testing, linking the Profit Communication Center (PCC)

Via the commandline, you can run an automated macro of a Profit analysis. This is an automated version of manually running that analysis and starting the macro. First, make sure the manual process works.

Run manual process:

  1. Log in as the Windows user who will later run the scheduled commandline.
  2. Install the Profit Communication Center.

    Link the Profit Communication Center to the Profit environment that contains the analyse. Do this with the Profit user under whose data the analysis is to be automated later.

    No two-factor authentication applies to the user. The commandline invoking the analysis (via the PCC) uses the PCC's setting to retrieve the analysis from the Profit environment. When the analysis is retrieved via the commandline, the user does not need to log in (even periodically) via two-factor authentication.

  3. Log in to Profit or InSite and run the analysis.
  4. Open the analysis in Excel.

    Note:

    If this requires you to click away certain popups, this is a problem because an automated process will not do this. Notifications about Office or Windows activation or licensing, for example, should be resolved first. If you get notifications about enabling macros, adjust Excel's security settings.

  5. Test running the macro.

    From Excel, launch the ‘PublishAnalysisDirect’ macro and check that the desired action is performed. For example, saving a .csv file for an import or HTML files and an XML file for an InSite cockpit. If you get any messages when doing this, resolve them before automating this process further.

Customise analysis:

Any analysis to be published must contain the ‘PublishAnalysis’ macro. This macro publishes the analysis as an htm page. In this macro, you specify the name and file location for the htm page.

The ‘PublishAnalysis’ macro can also be used to publish a cockpit that can be accessed via an InSite site. So it may happen that the analysis as a macro contains ‘PublishAnalysis’ used for this purpose. You should not simply modify such a macro; always do so in consultation with the InSite administrator in the organisation.

Creating the macro ‘PublishAnalysis’ is described in Publishing cockpits for InSite.

Create batch file (.bat):

Add a batch file on the system on which Profit Communication Center is installed. If Profit Communication Center is installed on the default file location, use the following command line:

"C:\Program Files (x86)\AFAS Software\Profit Communication Center\Profit communication center.exe" /PUBLISH="analysis name in Profit" /ENVIRONMENT="environment name"

For example: you want to publish the analysis ‘Sales’ from the environment O12345AA:

C:\Program Files (x86)\AFAS Software\Profit Communication Center\Profit communication center.exe" /PUBLISH="Sales" /ENVIRONMENT="O12345AA"

administration filter

The commandline contains a field that allows you to filter by administration code.

Add the Administration field to the data set of the analysis.

Command line:

"C:\Program Files (x86)\AFAS Software\Profit Communication Center\Profit communication center.exe" /PUBLISH="analysis name in Profit" /ENVIRONMENT="environment name" /UNIT="administration number"

Example:

You want to publish the analysis ‘Sales’ from the environment O12345AA for administration 1

"C:\Program Files (x86)\AFAS Software\Profit Communication Center\Profit communication center.exe" /PUBLISH="Sales" /ENVIRONMENT="O12345AA" /UNIT="1"

Publishing the Social analysis

Use this commandline to publish the social analysis from Profit HRM.

Commandline:

"C:\Program Files (x86)\AFAS Software\Profit Communication Center\Profit communication center.exe" /PUBLISH="name analysis in environment" /ENVIRONMENT="environment name" /HANDLER="socialeanalyse" /WERKGEVER="nummer" /PERIODETABEL="number of period tabel"

Example:

C:\Program Files (x86)\AFAS Software\Profit Communication Center\Profit communication center.exe" /HANDLER="socialeanalyse" /WERKGEVER="01" /PERIODETABEL="5"

Publishing the Occupancy analysis

Use this commandline to publish the occupancy analysis from Profit HRM.

Commandline:

"C:\Program Files (x86)\AFAS Software\Profit Communication Center\Profit communication center.exe" /PUBLISH="analysis name in Profit" /ENVIRONMENT="environment name" /HANDLER="bezettingsanalyse" /VANDATUM="dd/mm/jjjj" /TOTDATUM="dd/mm/jjjj" /PERIODETABEL="numbeer of period table"

For dates, always use a forward slash (/), regardless of your system's regional settings.

Example:

"C:\Program Files (x86)\AFAS Software\Profit Communication Center\Profit communication center.exe" /PUBLISH="analysis name in Profit" /ENVIRONMENT="environment name" /HANDLER="bezettingsanalyse" /VANDATUM="01/01/2024" /TOTDATUM="07/01/2025" /PERIODETABEL="number of period tabel"

There are two parameters.

Hours per formation

/FORMATIE="TRUE"

Absenteeism based on calendar days

/KALENDER="TRUE"

Directly to

  1. Publish a cockpit (analysis) on InSite
  2. Publish a cockpit on InSite (AFAS Online)