Every tables in the datasource is called when report is rendered

Stimulsoft Reports.JS discussion
Post Reply
EricB85
Posts: 3
Joined: Mon Jan 27, 2020 1:29 pm

Every tables in the datasource is called when report is rendered

Post by EricB85 »

Hello,

I have a Dictionary with one datasource (connected to postgresql) with, let' say, 10 tables.
I create a report with ONE table with only 2 columns.

When I execute this report, there is a http post call for every tables in the datasource with "select *" queries.
Is it normal?
How ca I tell stimulsoft to query only the table inside the report for only the 2 columns?

The code to execute the report is :

Code: Select all

 
StiOptions.WebServer.url = 'url/designer/post';
this.report.loadFile(`assets/reports/report_1.mrt`);
this.viewer.report = this.report;
this.viewer.renderHtml("viewer");
Regards,

Eric
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Every tables in the datasource is called when report is rendered

Post by HighAley »

Hello, Eric.

Sorry, how many data sources are in the dictionary of the report?
Do you get extra requests for the data that are not in the dictionary?

You could also try to set the Retrieve Only Used Data property of the report.

Thank you.
EricB85
Posts: 3
Joined: Mon Jan 27, 2020 1:29 pm

Re: Every tables in the datasource is called when report is rendered

Post by EricB85 »

Hello HighAley,

Thanks for your answer, I did not know this property. Can you tell me how to set it, I don't find documentation on this property.

I have one database with 10 datasources (tables) in the dictionary and only one datasource is used in the report.

*** UPDATE ***

Ok found it : https://admin.stimulsoft.com/documentat ... lyuseddata
It is working fine, it now only request the correct datasource ! Thank you !
There could be another improvement, if my datasource has 50 columns and I only want to display 2 columns, the generated query is still "Select * from mytable", do you know if it is possible to only request the columns displayed in the report ? (I have very large columns that I don't display)

Eric
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Every tables in the datasource is called when report is rendered

Post by Lech Kulikowski »

Hello,

Unfortunately, no. There are no options to change queries by used columns in the report only.

Thank you.
Post Reply