Page 1 of 1

The report or dashboard is not specified

Posted: Tue Apr 08, 2025 5:01 pm
by ippc
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?

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);
}
thank you

Re: The report or dashboard is not specified

Posted: Wed Apr 09, 2025 11:20 am
by Max Shamanov
Hello,

Please check our sample at the following link:
https://github.com/stimulsoft/Samples-D ... ET-Angular

Thank you.

Re: The report or dashboard is not specified

Posted: Wed Apr 09, 2025 2:07 pm
by ippc
I'm not able to find any difference in the code. is there anything else you can provide to help me troubleshoot this issue?

Is the 1st call to GetReport somehow setting an id and/or caching something?
Are the subsequent calls to ViewerEvent getting an id out of the "stiweb parameters" I see in the payload and then looking for something in the cache that it's not finding? Would that report that error I am seeing, or would that report a different error like 'report not found in cache' ?

Initially I thought the issue was that I was using ng serve to host the webapi from within VS 2022. I switched it to use IISExpress like your sample, but I still have the same issue.

Re: The report or dashboard is not specified

Posted: Wed Apr 09, 2025 9:59 pm
by Lech Kulikowski
Hello,

Most probably, the issue with caching. Please check the following article:
https://www.stimulsoft.com/en/documenta ... aching.htm

Thank you.