logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
artificer  
#1 Posted : Wednesday, August 24, 2022 3:42:40 PM(UTC)
artificer

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.";
}
epf  
#2 Posted : Tuesday, August 30, 2022 6:36:28 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

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'
Users browsing this topic
Guest
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.