No possibility to create a report based on postgresql

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

No possibility to create a report based on postgresql

Post by MichalCh »

Hi,

I've connected to postgresql database directly and for schema "public" I can retrieve all the columns. But when I click on "preview" (I do not have to put even any data on the report template) there is an error that sort of "relation" does not exists.

I'm attaching two screenshots where you can see clearly what I mean and also a .txt file with two queries so you can easily create yourself and insert some data.

I'm using the newest JS Stimulsoft client.

Hope to hear from you soon!

Best wishes,
Michal Choldrych
Attachments
query.txt
(3.09 KiB) Downloaded 191 times
Screenshot_180.png
Screenshot_180.png (12.41 KiB) Viewed 6701 times
Screenshot_179.png
Screenshot_179.png (73.88 KiB) Viewed 6701 times
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: No possibility to create a report based on postgresql

Post by Edward »

Hi Michal,

Thank you for the bug report, do you mind to send us a sample JS test, that reproduces the issue, so we could help in fixing the problem or to provide a required fix.
Sorry about that, but that would be of a great help.

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

Re: No possibility to create a report based on postgresql

Post by tayar »

Hi Edward,

The issue is Independent from the Designer version used. I can reproduce same with WPF Designer.
Attached is a sample report.

Best regards
Vitaly
Attachments
PostgresReport.mrt
PostgresReport
(8.08 KiB) Downloaded 212 times
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: No possibility to create a report based on postgresql

Post by Edward »

Hi Vitaly,

Thank you for the sample report and your comment. We will update you in this topic and will reply to your email request as well once the solution for the problem is found.
The workaround has been explained here for now:
viewtopic.php?f=8&t=56192

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

Re: No possibility to create a report based on postgresql

Post by tayar »

Hi Edward,

There is no workaround on the topic you mentioned. That topic mentions databases other than public.
This one says that even with pubic it does not work

Best regards
Vitaly
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: No possibility to create a report based on postgresql

Post by Edward »

Hi Vitaly,

Yes, you are correct, that is a slightly different issue, true. Are you using the latest PostGreSql 10.4 and Windows 10 x64? I have done a quick test with that database. With the schema that was mentioned in the above topic.
The report was rendered without any issue. Please check my report attached.
PostgresReport_MyDb.mrt
(6.57 KiB) Downloaded 226 times
I think I need to kindly request the db script to create the database schema that you used for the test you explained and kindly provided the mrt report for us.

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

Re: No possibility to create a report based on postgresql

Post by tayar »

Hi Edward,

The designer runs on Windows 10 x64.
The DB is PostgreSQL 9.6.5 on x86_64-pc-linux-gnu (running within docker)

Another interesting observation, the connection string in the report you sent contains
Min Pool Size=0
wich is not recognized in my environment. The data adapter has been automatically downloaded by the designer (Npgsql 2.2.7.0).

Below is a table creation script used for this tests (on the default schema public)

Code: Select all

CREATE TABLE public."Reservation"
(
  "Id" uuid NOT NULL,
  "TenantId" uuid NOT NULL,
  "PropertyId" uuid NOT NULL,
  "Arrival" date,
  "Departure" date,
  "Adults" integer,
  "Children" integer,
  "FirstName" text,
  "LastName" text,
  "Title" text,
  "ReservationStatus" text,
  "VIP" text,
  "Notes" text,
  "RoutingInstructions" text,
  "PurchaseElements" text,
  "InventoryStatus" text,
  CONSTRAINT "PK_Reservation" PRIMARY KEY ("Id")
)
WITH (
  OIDS=FALSE
);
ALTER TABLE public."Reservation"
  OWNER TO postgres;

-- Index: public."idx_Arrival"

-- DROP INDEX public."idx_Arrival";

CREATE INDEX "idx_Arrival"
  ON public."Reservation"
  USING btree
  ("PropertyId", "Arrival");

The report itself is attached to a previous post
Lech Kulikowski
Posts: 6254
Joined: Tue Mar 20, 2018 5:34 am

Re: No possibility to create a report based on postgresql

Post by Lech Kulikowski »

Hello,

Please try to use the following query:

Code: Select all

select * from public."Reservation"
Thank you.
tayar
Posts: 30
Joined: Tue Sep 26, 2017 9:22 am

Re: No possibility to create a report based on postgresql

Post by tayar »

Hello Lech,

yes, this is correct. This query works. However the query has not been written manually but generated automatically by Stimulsoft designer while selecting the available tables. End user has no idea and knowledge that they need to modify query. Also in our environment they won't know anything about existing schemas

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

Re: No possibility to create a report based on postgresql

Post by Lech Kulikowski »

Hello Vitaly,

We have added this task to our to-do list.

Thank you.
Post Reply