Start more report at the same time
Posted: Thu Oct 17, 2019 9:06 am
Hi!
When I start 3 reports in my Asp.Net MVC porogram, the first report is running, while the second and third is waiting.
Then when the first is ready (the report is appeared on the screen), the seconsd is strating, etc.
This is very bad.
I use MS SQL Server. Report is designed in Designer.WinForms.exe and uses MS SQL Server stored procedure.
Code:
1. My first method
. . .
return PartialView("~/Reports/_ReportBizonylatok1.cshtml");
---------------------
2. _ReportBizonylatok1.cshtml
@using Stimulsoft.Report.Mvc;
@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions()
{
Actions =
{
GetReport = "GetReportBizonylatok1",
EmailReport = "EmailReport",
ViewerEvent = "ViewerEvent"
},
Toolbar =
{
ShowSendEmailButton = true
},
Server =
{
RequestTimeout = 9000
},
Localization = "~/Localization/hu.xml"
})
---------------------
3. GetReportBizonylatok1 method
StiReport report = new StiReport();
// * * * Load report
report.Load(Server.MapPath("~/Reports/RepBizonylatok1.mrt"));
// * * * Set connectionstring
string connstr = Util.Utils.GetStimulsoftConnString();
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new StiSqlDatabase("MS SQL", connstr));
// * * * Parameters
report["@Year"] = 2019;
report["@Month"] = 10;
. . .
// * * * Render
report.Render();
// * * * Return
return StiMvcViewer.GetReportResult(report);
What can I do?
Thanks.
When I start 3 reports in my Asp.Net MVC porogram, the first report is running, while the second and third is waiting.
Then when the first is ready (the report is appeared on the screen), the seconsd is strating, etc.
This is very bad.
I use MS SQL Server. Report is designed in Designer.WinForms.exe and uses MS SQL Server stored procedure.
Code:
1. My first method
. . .
return PartialView("~/Reports/_ReportBizonylatok1.cshtml");
---------------------
2. _ReportBizonylatok1.cshtml
@using Stimulsoft.Report.Mvc;
@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions()
{
Actions =
{
GetReport = "GetReportBizonylatok1",
EmailReport = "EmailReport",
ViewerEvent = "ViewerEvent"
},
Toolbar =
{
ShowSendEmailButton = true
},
Server =
{
RequestTimeout = 9000
},
Localization = "~/Localization/hu.xml"
})
---------------------
3. GetReportBizonylatok1 method
StiReport report = new StiReport();
// * * * Load report
report.Load(Server.MapPath("~/Reports/RepBizonylatok1.mrt"));
// * * * Set connectionstring
string connstr = Util.Utils.GetStimulsoftConnString();
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new StiSqlDatabase("MS SQL", connstr));
// * * * Parameters
report["@Year"] = 2019;
report["@Month"] = 10;
. . .
// * * * Render
report.Render();
// * * * Return
return StiMvcViewer.GetReportResult(report);
What can I do?
Thanks.