Reports.NET ignores chart interlacing colour from template and uses style colour; Reports.JS uses template colour

Stimulsoft Reports.NET discussion
Post Reply
iceman
Posts: 4
Joined: Thu Sep 24, 2026 7:55 am

Reports.NET ignores chart interlacing colour from template and uses style colour; Reports.JS uses template colour

Post by iceman »

Product / version: Stimulsoft Reports.NET (`Stimulsoft.Reports.Engine`) 2026.3.4 and 2026.4.1, compared with Reports.JS (`stimulsoft-reports-js`) 2026.3.4 and 2026.4.1. .NET 10, Windows.

Description

The same report renders charts with different background stripes (interlacing) in Reports.NET and Reports.JS. Reports.JS draws the stripes with the `InterlacedBrush` saved in the template. Reports.NET ignores that brush and draws the style colour instead (`rgba(155,155,155,0.039)`), even when the chart area has `AllowApplyStyle = false`.

As a result, a report designed in the JS designer with no stripes (transparent brush) shows grey stripes when rendered on the server, and a custom stripe colour is never used on the server.

Steps to reproduce

The attached `InterlacingRepro.mrt` has two column charts. Both chart areas have `AllowApplyStyle = false`:

- `TransparentStripes`: `InterlacingHor/Vert.InterlacedBrush = Transparent` (saved as `"solid:"`)
- `RedStripes`: `InterlacingHor/Vert.InterlacedBrush = solid:80,255,0,0`

1. Reports.NET: run the attached console app (`net/`): `dotnet run -- InterlacingRepro.mrt net-output.html`. It loads the template, renders it and exports HTML with default settings.
2. Reports.JS: open `js-repro.html`. It loads the same template, renders it and exports HTML with default settings.

Actual result (Reports.NET, `net-output.png`): both charts have the same light grey stripes. The transparent and red brushes from the template are ignored.

Expected result (as in Reports.JS, `js-output-v4.png`): no stripes in `TransparentStripes`, red stripes in `RedStripes`.

Analysis

`StiInterlacingHor` and `StiInterlacingVert` have their own `AllowApplyStyle` property. It defaults to `true` and is not saved in the template. Reports.NET applies the chart style to the interlacing because of it, and overwrites `InterlacedBrush`, even though the chart area has `AllowApplyStyle = false`. Reports.JS keeps the template brush.

Setting `area.InterlacingHor.AllowApplyStyle = false` and `area.InterlacingVert.AllowApplyStyle = false` before `Render()` makes Reports.NET match Reports.JS (`net-output-workaround.png`; run the app with `--workaround`). We use this as a workaround for now.

Expected behaviour: when the chart area does not apply styles, the interlacing should not apply them either, the same as in Reports.JS. Alternatively, both engines should at least behave the same way.

Attachments: `InterlacingRepro.mrt`, `net/` (`Program.cs`, `InterlacingRepro.csproj`), `js-repro.html`, `net-output.png`, `net-output-workaround.png`, `js-output-v4.png`.
Attachments
repro-interlacing.7z
(80.19 KiB) Downloaded 8 times
Lech Kulikowski
Posts: 7884
Joined: Tue Mar 20, 2018 5:34 am

Re: Reports.NET ignores chart interlacing colour from template and uses style colour; Reports.JS uses template colour

Post by Lech Kulikowski »

Hello iceman,

Thank you for the detailed report and the repro files.
We have reproduced the issue. We will fix this so that both engines behave the same way and let you know as soon as the fix is available.

Your workaround is valid in the meantime.

Thank you.
#21591
Post Reply