Connecting database to postgres to different schema then pub

Stimulsoft Reports.NET discussion
Post Reply
MichalCh
Posts: 17
Joined: Fri Sep 22, 2017 7:37 am

Connecting database to postgres to different schema then pub

Post by MichalCh »

Hi,

We have a postgres database and we have three different schemas. Of course there is also the default one called "public" for all tables for postgres.
Unfortunately there is no way to connect to other schema or have some sort of choice. We're always connecting to the "public" one.

Will there be a fix for it or am I missing an option?

Best wishes,
Michal Choldrych
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Connecting database to postgres to different schema then

Post by Edward »

Hi Michal/Vitaly,

Thank you for your request, but in order to help you, do you mind to email us a small sample that reproducing the issue, so we are able to reproduce the issue and to help in fixing the problem.

Thank you,
Edward
3153380
tayar
Posts: 30
Joined: Tue Sep 26, 2017 9:22 am

Re: Connecting database to postgres to different schema then

Post by tayar »

Hi,

I can't send you any report as it is not possible to create a report.
The steps to reproduce.
* Connect to postgres DB
* Create schema

Code: Select all

CREATE SCHEMA "ReportSchema";
* Create a table in this schema

Code: Select all

CREATE TABLE "ReportSchema"."ReportTable"
(
  "Id" uuid NOT NULL,
  "FirstName" text,
  "LastName" text,
  CONSTRAINT "PK_ReportTable" PRIMARY KEY ("Id")
)
WITH (
  OIDS=FALSE
);
* Open Stimulsoft Report Designer
* Connect to Potrgres DB (using NpgSQL)
* The table is not visible
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Connecting database to postgres to different schema then

Post by Lech Kulikowski »

Hello,

You can use the following option:
StiOptions.Engine.RetrieveSchemaNamePostgreSql = "schemaname";

Thank you.
tayar
Posts: 30
Joined: Tue Sep 26, 2017 9:22 am

Re: Connecting database to postgres to different schema then

Post by tayar »

Hi Lech,

Thanks for the response. This is a solution from to be used from the code.
is there anyway to use other schemas from the standard Stimulsoft Designer application?

Thanks
Vitaly
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Connecting database to postgres to different schema then

Post by Lech Kulikowski »

Hello,

Unfortunately, there is no option in PostgreSQL to specify schema name in the connection string.

Thank you.
Post Reply