Hello,
I have a report with 4 datasources for a dictionary. I see the order they are displayed in the Designer UI and iterating through the datasources in code using:
foreach (StiSqlSource curDatasource in report.Dictionary.DataSources)
{
System.Diagnostics.Trace.WriteLine("SQL Datasource Name: " + curDatasource.Name );
}
produces these trace statements:
SQL Datasource Name: ProposalData
SQL Datasource Name: CompanyLogoQuery
SQL Datasource Name: _AppRole1Copy
SQL Datasource Name: JobHeaderConditions
However, monitoring the request to the SQL Server I can tell that these request/statements are not executed in this order.
What determines the order the datasources are executed?
Is there a way to control which source executes first?
What controls the order the datasources execute
-
- Posts: 2
- Joined: Thu Aug 10, 2023 11:47 pm
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: What controls the order the datasources execute
Hello,
It should connect in order as its stored in the Dictionary.
What product and version are you use? How do you run your reports?
Thank you.
It should connect in order as its stored in the Dictionary.
What product and version are you use? How do you run your reports?
Thank you.
-
- Posts: 2
- Joined: Thu Aug 10, 2023 11:47 pm
Re: What controls the order the datasources execute
Hi Lech,
I'm using Stimulsoft Report.Net 2023.3.1.
The basics of my calls are:
Report.Load(fileName);
foreach (StiDatabase curDatabase in report.Dictionary.Databases)
{
((StiSqlDatabase)curDatabase).ConnectionString = connectionString;
}
Report.Show(true);
Watching with SQL Profiler I can see that the data sets are executing in this order:
_AppRole1Copy
JobHeaderConditions
ProposalData
CompanyLogoQuery
You can see in this image the datasets shown in the designer. The order there matches the order from the loop through the datasets I posted originally.
https://workdrive.sharpesoft.com/extern ... 461354dcc8
I'm using Stimulsoft Report.Net 2023.3.1.
The basics of my calls are:
Report.Load(fileName);
foreach (StiDatabase curDatabase in report.Dictionary.Databases)
{
((StiSqlDatabase)curDatabase).ConnectionString = connectionString;
}
Report.Show(true);
Watching with SQL Profiler I can see that the data sets are executing in this order:
_AppRole1Copy
JobHeaderConditions
ProposalData
CompanyLogoQuery
You can see in this image the datasets shown in the designer. The order there matches the order from the loop through the datasets I posted originally.
https://workdrive.sharpesoft.com/extern ... 461354dcc8
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: What controls the order the datasources execute
Hello,
Please send your report template for analysis.
Thank you.
Please send your report template for analysis.
Thank you.