We will add port customization in the next version for PostgreSQLDataSource. Meanwhile you could either:
1 . Open the file koolreport/core/src/datasources/PostgreSQLDataSource.php
and replace the following lines:
$host = Util::get($this->params, "host", "");//host\instanceName
$username = Util::get($this->params, "username", "");
$password = Util::get($this->params, "password", "");
$dbname = Util::get($this->params, "dbname", "");
$connString = "host=$host dbname=$dbname user=$username password=$password";
with these:
$host = Util::get($this->params, "host", "");//host\instanceName
$port = Util::get($this->params, "port", 5432);
$username = Util::get($this->params, "username", "");
$password = Util::get($this->params, "password", "");
$dbname = Util::get($this->params, "dbname", "");
$connString = "host=$host port=$port dbname=$dbname user=$username password=$password";
Then customize port like this:
"postgresql"=> [
'host' => '127.0.0.1',
'port' => 5433,
'username' => 'postgres',
'password' => 'toto',
'dbname' => 'test',
'class' => "\koolreport\datasources\PostgreSQLDataSource"
],
2 . Use PDODataSource in which you could customize port in its connection string.
Let us know if you have more question. Thanks!