Page 1 of 1

Conditions colours don`t work

Posted: Fri Jun 19, 2020 10:16 am
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.

Re: Conditions colours don`t work

Posted: Fri Jun 19, 2020 10:17 pm
by Lech Kulikowski
Hello,

Please set the EngineVersion = EngineV2 property for the report.

Thank you.