Conditions colours don`t work

Stimulsoft Reports.WEB discussion
Post Reply
andreich
Posts: 1
Joined: Fri Jun 19, 2020 10:08 am

Conditions colours don`t work

Post by andreich »

I am using designer 2020.2.3 and Asp Net Core application.

Trying to set "StatusColor" column based on its value. But when its rendered it is always black.

I have set Highlight conditions in the Databand for the text item. Have set it to Value, Numeric, Summary.StatusColor equal to 1 and set Red color.

Have this code to load and populate test data:

List<TestClass> data = new List<TestClass>
{
new TestClass
{
LocationId = 1,
LocationName = "TestLocation",
AssetName = "TestAsset",
Status = "OK",
StatusColor = 0,
},
new TestClass
{
LocationId = 1,
LocationName = "TestLocation2",
AssetName = "TestAsset2",
Status = "Bad",
StatusColor = 1
}
};

string reportPath = Path.Combine(environment.ContentRootPath, "Reports");
string path = Path.Combine(reportPath, "AssetTrackingDailyStatus.mrt");
var report = new StiReport();
report.Load(path);
report.RegData("emsdb.Summary", data);

return StiNetCoreReportResponse.ResponseAsPdf(report);

As seen, the StatusColor is set to 1 and to 2. But both columns are black.
I have attached the mrt file I use.
Attachments
AssetTrackingDailyStatus.mrt
(10.04 KiB) Downloaded 117 times
Lech Kulikowski
Posts: 7338
Joined: Tue Mar 20, 2018 5:34 am

Re: Conditions colours don`t work

Post by Lech Kulikowski »

Hello,

Please set the EngineVersion = EngineV2 property for the report.

Thank you.
Post Reply