Seal Report Forum
»
Report Edition
»
Data Source Creation
»
Change Enumerated List's Information message at Runtime
Rank: Newbie
Groups: Registered
Joined: 8/26/2019(UTC) Posts: 2
|
Hi admin, One of my use-case, involves changing the "Information message" of an Enumerated list in code. I have tried several obvious methods, but it always display the initial message set at the Enumerated list creation Some of the trials: Code:
enumList.Information = "No user records returned.";
Code:
enumList.Message = "No user records returned";
Code:
var e = enumList.Source.MetaData.Enums.FirstOrDefault(c => c.Name == "UsersFilterableByOPFs");
if (e != null)
{
e.Message = "No user records returned.";
}
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
You should change the message in the 'Report Execution Init Script'. e.g. Code:@{
Report report = Model;
ReportExecutionLog log = report;
foreach (var anEnum in report.Sources.First().MetaData.Enums) {
anEnum.Message = "My custom message";
}
}
works when added to the sample '09-Enumerated List - Dynamic Display'
|
|
|
|
Seal Report Forum
»
Report Edition
»
Data Source Creation
»
Change Enumerated List's Information message at Runtime
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.