ASP.NET + AngularJS
Posted: Sat Mar 24, 2018 9:36 pm
Hi,
I have to somehow show report in AngularJS application. Report is loaded on server side in ASP.NET application, in controller with code like this:
public IActionResult test_report()
{
var report = new StiReport();
report.Load(StiNetCoreHelper.MapPath(this, "Reports/test_report.mrt"));
return StiNetCoreViewer.GetReportResult(this, report);
}
How can I show this report in AngularJS page?
I have tried to send a view, from above controller a view is:
@Html.StiNetCoreViewer("StiMvcViewer1", new StiNetCoreViewerOptions()
{
Actions =
{
GetReport = Model,
ViewerEvent = "ViewerEvent",
DesignReport = "Design"
},
Appearance =
{
BackgroundColor = System.Drawing.Color.FromArgb(0xe8, 0xe8, 0xe8),
ScrollbarsMode = true
},
Toolbar =
{
DisplayMode = StiToolbarDisplayMode.Separated,
ShowDesignButton = false
},
Width = Unit.Percentage(100),
Height = Unit.Percentage(100)
})
So, I tried to return this view to AngularJS application and show output HTML, but nothing shows on page.
We cannot connect to database from client JavaScript. Any idea how to load a report on server side ASP.NET and show it in Angular application?
Thanks,
I have to somehow show report in AngularJS application. Report is loaded on server side in ASP.NET application, in controller with code like this:
public IActionResult test_report()
{
var report = new StiReport();
report.Load(StiNetCoreHelper.MapPath(this, "Reports/test_report.mrt"));
return StiNetCoreViewer.GetReportResult(this, report);
}
How can I show this report in AngularJS page?
I have tried to send a view, from above controller a view is:
@Html.StiNetCoreViewer("StiMvcViewer1", new StiNetCoreViewerOptions()
{
Actions =
{
GetReport = Model,
ViewerEvent = "ViewerEvent",
DesignReport = "Design"
},
Appearance =
{
BackgroundColor = System.Drawing.Color.FromArgb(0xe8, 0xe8, 0xe8),
ScrollbarsMode = true
},
Toolbar =
{
DisplayMode = StiToolbarDisplayMode.Separated,
ShowDesignButton = false
},
Width = Unit.Percentage(100),
Height = Unit.Percentage(100)
})
So, I tried to return this view to AngularJS application and show output HTML, but nothing shows on page.
We cannot connect to database from client JavaScript. Any idea how to load a report on server side ASP.NET and show it in Angular application?
Thanks,