Stimulsoft version: 2024.4.3.0 (also reproduced in the 2026.3.1 release)
Package: Stimulsoft.Dashboards.Web (NuGet)
Environment: .NET Framework, tried both from IIS and from a minimal Console App
I have a Dashboard with a single Online Map element (StiOnlineMapElement) using GIS mode
(StiGisMapMeter bound to a WKT primitive column, e.g. "POINT (-3.7038 40.4168)" or
"POLYGON ((-3.75 40.40, -3.65 40.40, -3.65 40.45, -3.75 40.45, -3.75 40.40))").
The data is confirmed correct — pasting it directly as a static/manually entered value in
the Designer editor renders the point/polygon correctly in the live preview, and exporting
manually from the Designer's own Export menu (PNG or PDF) also works fine.
However, exporting programmatically with:
var report = new StiReport();
report.Load(@"MapDashboard.mrt");
report.Render();
report.ExportDocument(StiExportFormat.ImagePng, stream); // same result with .Pdf
...renders the document, but the Online Map element shows a generic red error message
in place of the map, with no additional error text. No managed .NET exception is thrown
to the calling code (try/catch around ExportDocument catches nothing), and enabling
"Common Language Runtime Exceptions" (break on all) in the Visual Studio debugger does
not break anywhere — the error appears to be swallowed/handled entirely inside the
Stimulsoft rendering engine.
Things I've already ruled out:
- Data: same result with a hardcoded literal WKT expression, no data binding at all.
- Base map / tiles: a plain Online Map with NO Gis binding (just base tiles, or
Latitude/Longitude marker mode) renders and exports fine.
- Network/connectivity: confirmed outbound HTTPS access works fine from the same process.
- Map provider: reproduced with OpenStreetMap, Bing, and Google.
- License: reproduced both with and without an active license key.
- Missing assemblies: initially got StiDashboardAssemblyIsNotFoundException, resolved by
ensuring Stimulsoft.Dashboard.dll / .Drawing.dll / .Export.dll are present in the output
folder — after fixing that, the issue described above is what remains.
- Version: reproduced on both 2024.4.3.0 and the latest 2026.X release, freshly designed
dashboard from scratch (not a migrated/legacy .mrt).
- Environment: reproduced identically from IIS and from a bare Console App run in an
interactive desktop session (ruling out Session 0 / no-desktop issues).
So the difference seems to be specifically "Designer's own Export command" vs.
"programmatic StiReport.ExportDocument()" for an Online Map in GIS mode.
I can provide a minimal repro project (a few lines of code, no external dependencies
besides the NuGet package) and the .mrt file. Any guidance appreciated — happy to attach
the sample project as requested in other threads here.
Online Map (GIS mode) renders correctly in Designer export but shows generic error on programmatic ExportDocument (PNG a
-
jjimenezji
- Posts: 2
- Joined: Mon Aug 10, 2026 12:10 pm
-
Lech Kulikowski
- Posts: 7835
- Joined: Tue Mar 20, 2018 5:34 am
Re: Online Map (GIS mode) renders correctly in Designer export but shows generic error on programmatic ExportDocument (P
Hello,
We need some additional time to investigate the issue, we will let you know about the result as soon as possible.
Thank you.
#20955
We need some additional time to investigate the issue, we will let you know about the result as soon as possible.
Thank you.
#20955
-
Lech Kulikowski
- Posts: 7835
- Joined: Tue Mar 20, 2018 5:34 am
Re: Online Map (GIS mode) renders correctly in Designer export but shows generic error on programmatic ExportDocument (P
Hello,
In the case of a Dashboard, you need to use different methods for export:
StiDashboardExportTools.ExportToBytes
StiDashboardExportTools.ExportToStream
StiDashboardExportTools.ExportToFile
The issue is that dashboards generate data depending on the dashboard settings using special code that runs in a separate thread. In your sample, maps are also used, which, depending on the provider type, position, and current zoom level, need to load the content to be displayed. The map is split into areas (tiles), which are also loaded in multiple threads. However, during export, it is also necessary to wait until everything required for a complete export has finished loading.
Thank you.
In the case of a Dashboard, you need to use different methods for export:
StiDashboardExportTools.ExportToBytes
StiDashboardExportTools.ExportToStream
StiDashboardExportTools.ExportToFile
The issue is that dashboards generate data depending on the dashboard settings using special code that runs in a separate thread. In your sample, maps are also used, which, depending on the provider type, position, and current zoom level, need to load the content to be displayed. The map is split into areas (tiles), which are also loaded in multiple threads. However, during export, it is also necessary to wait until everything required for a complete export has finished loading.
Thank you.
-
jjimenezji
- Posts: 2
- Joined: Mon Aug 10, 2026 12:10 pm
Re: Online Map (GIS mode) renders correctly in Designer export but shows generic error on programmatic ExportDocument (P
Hello,
Thank you for your answer. I get the same result using those functions. I attach the code and the .mrt I am using if that helps.
I also attach the image I get.
Thank you for your answer. I get the same result using those functions. I attach the code and the .mrt I am using if that helps.
Code: Select all
var report = new StiReport();
report.Load(@"C:\Temp\MapDashboard.mrt");
report.Render();
var settingsIm = new StiImageDashboardExportSettings();
var settingsPdf = new StiPdfDashboardExportSettings();
StiDashboardExportTools.ExportToFile(report, @"C:\Temp\test.png", settingsIm);
StiDashboardExportTools.ExportToFile(report, @"C:\Temp\test.pdf", settingsPdf);
- Attachments
-
- test.png (18.86 KiB) Viewed 24 times
-
- MapDashboard.mrt
- (4.25 KiB) Downloaded 3 times
-
Lech Kulikowski
- Posts: 7835
- Joined: Tue Mar 20, 2018 5:34 am
Re: Online Map (GIS mode) renders correctly in Designer export but shows generic error on programmatic ExportDocument (P
Hello,
We have found and fixed the issue related to dashboard exports. Please check the next build.
Thank you.
We have found and fixed the issue related to dashboard exports. Please check the next build.
Thank you.