Page 1 of 1

Every tables in the datasource is called when report is rendered

Posted: Mon Jan 27, 2020 1:36 pm
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

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

Posted: Wed Jan 29, 2020 12:16 am
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.

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

Posted: Wed Jan 29, 2020 8:33 am
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

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

Posted: Sun Feb 02, 2020 8:09 pm
by Lech Kulikowski
Hello,

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

Thank you.