Page 1 of 1

TOC shows no page numbers for big reports with cache activated

Posted: Fri Feb 06, 2026 1:50 pm
by CErdmann
Hi Stimulsoft Team,

at Fresenius Kabi Deutschland GmbH we have to generate PDF reports having sometimes even more than 1000 pages.
Our first approach to use the JS version in the frontend of our app failed, because it needs to much time and RAM.
So, we decided to use the .NET version (2026.1.3) on the backend.

To prevent an overload of the backend we use the report cache (ReportCacheMode = On or Auto) to control the RAM consumption.
This works good in general, but we identified a showstopper.

The Table of Contents component works correctly only for small reports up to about 40 pages.
But beyond 50 pages the TOC shows no page numbers, if we activate the report cache (mode = On or Auto with LimitForStartUsingCache < number of pages).
This appears even, if the TOC contains just one entry and the additional pages include nothing to display in the TOC.

To reproduce the issue we created a simple sample report.
It consists of one page with the TOC and a second page with one data band with the text entry for the TOC and another data band bound to a JSON datasource to create the additional pages.

The sample report is not faulty, because it works perfect with the JS version.
So, this seems to be a bug in the interaction of the TOC component and the report cache in the .NET version.

Can you confirm that this is a bug?
While waiting for a fix: Is there something we can change in our templates, so that the TOC will work for big reports with cache in .NET 2026.1.3?

Please find attached the sample report and JSON data files to generate reports with 20, 40, 50, 80 pages.

The program to execute can be as simple as that:

report = new StiReport();
report.Load(args[0]);
var dataSet = StiJsonToDataSetConverterV2.GetDataSetFromFile(args[1] + ".json");
report.Dictionary.Databases.Clear();
report.RegData("JSON", "", dataSet);
report.ReportCacheMode = (StiReportCacheMode)int.Parse(args[2]);
if (report.ReportCacheMode == StiReportCacheMode.Auto)
{
StiOptions.Engine.ReportCache.LimitForStartUsingCache = 10;
}
var renderState = new StiRenderState(false);
_ = await report.RenderAsync(renderState);
_ = await report.ExportDocumentAsync(StiExportFormat.Pdf, args[1] + ".pdf");

Thanks in advance for checking this issue.

Re: TOC shows no page numbers for big reports with cache activated

Posted: Fri Feb 06, 2026 3:14 pm
by HighAley
Hello,

We need some time to analyse the issue, and we will let you know as soon as we have any results.

Thank you.

Ticket reference: #19462