Page 1 of 1

Slow by code

Posted: Thu Apr 23, 2020 5:33 pm
by luigi.arena
Hello,
I have a query with groupby and sum, this query return 60.000 record.

If I execute query by sql server editor, the execute time is 1 second
If I execute query by stimulsoft designer the execute time is 1 second

When I call the report by my site the execute time is more 15 second and sometime I have an error memory exception.
This is my code for open Dashboard:

Code: Select all

public IActionResult Viewerevent()
        {
            return StiNetCoreViewer.ViewerEventResult(this);
        }

        public IActionResult GetReport()
        {
            StiReport report = new StiReport();
            StiSqlDatabase sqlDB = new StiSqlDatabase();
            report.Load(StiNetCoreHelper.MapPath(this, "Report/repname.mrt"));            
            sqlDB = (StiSqlDatabase)report.Dictionary.Databases["MS SQL"];
            sqlDB.ConnectionString = AppSettings.DbConnection;
            report.Render();
            return StiNetCoreViewer.GetReportResult(this, report);
        }
Help me

Re: Slow by code

Posted: Mon Apr 27, 2020 10:58 am
by Lech Kulikowski
Hello,

Please send us a sample that reproduces the issue for analysis.

Thank you.

Re: Slow by code

Posted: Thu Apr 30, 2020 6:34 pm
by luigi.arena
Sorry how do I send 40gb of Database?
Or how do I send you a table with 50,000 records?

Re: Slow by code

Posted: Thu Apr 30, 2020 6:36 pm
by luigi.arena
Can you explain to me the best way to visualize a table with 50,000 records?
I tried to set a Select Top (1000) but then when I use the filters in the dashboard, the filter is applied only to those 1000 records and does not reload them from the database.
How can I do ?

Re: Slow by code

Posted: Tue May 05, 2020 2:19 pm
by HighAley
Hello, Luigi.

Our engine need to get all data.
You could use parameters to filter data and get necessary data only.

Our engine needs some time to process data so 15 seconds in not so long.

Please, use the next code to create the report instance:
var report = StiReport.CreateNewDashboard();

You should not call the Render() method for the dashboards.

Please, let us know if you still need our help.

Thank you.