The report or dashboard is not specified
Posted: Tue Apr 08, 2025 5:01 pm
I just started my trial period and am trying to get the angular viewer working. I believe I've followed what tutorials I could find properly. I do finally have a report rendering in the browser, but I can't print, or change zoom, etc., without getting an error that says, "The report or dashboard is not specified".
I'm on angular 17, .net core 8, and sql server.
Below is my html and C# code. What am I missing?
Also, is there a way to make the default initial zoom be page width?
thank you
I'm on angular 17, .net core 8, and sql server.
Below is my html and C# code. What am I missing?
Also, is there a way to make the default initial zoom be page width?
Code: Select all
<stimulsoft-viewer-angular
[requestUrl]="'https://localhost:4200/api/reports/{action}'"
[action]="'InitViewer'"
[height]="'100%'">
</stimulsoft-viewer-angular>
Code: Select all
[HttpPost]
[Route("InitViewer")]
public IActionResult InitViewer()
{
var requestParams = StiAngularViewer.GetRequestParams(this);
var options = new StiAngularViewerOptions();
options.Actions.GetReport = "GetReport";
options.Actions.ViewerEvent = "ViewerEvent";
options.Appearance.ScrollbarsMode = true;
return StiAngularViewer.ViewerDataResult(requestParams, options);
}
[HttpPost]
[Route("GetReport")]
[RequestTimeout(milliseconds: 90000)]
public IActionResult GetReport()
{
var report = StiReport.CreateNewReport();
StiOptions.Viewer.Windows.Zoom = 1;
var path = StiAngularHelper.MapPath(this, $"Reports/TestList.mrt");
report.Load(path);
return StiAngularViewer.GetReportResult(this, report);
}
[HttpPost]
[Route("ViewerEvent")]
public IActionResult ViewerEvent()
{
return StiAngularViewer.ViewerEventResult(this);
}