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
nimainship  
#1 Posted : Tuesday, March 29, 2022 9:56:11 AM(UTC)
nimainship

Rank: Newbie

Groups: Registered
Joined: 3/29/2022(UTC)
Posts: 7
Taiwan, Province Of China

Thanks: 2 times
Hi I'm SealReport rookie
I want to know how can I change my show totals display name for column(bottom row total>Average)

PhotoLink


thanks all

Edited by user Tuesday, March 29, 2022 9:59:08 AM(UTC)  | Reason: Not specified

epf  
#2 Posted : Friday, April 1, 2022 12:12:43 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)
A simple way to change the total title for rows is to use the 'Cell Script' of the element:

Code:
@{
    ResultCell cell=Model;
    if (cell.IsTitle && cell.IsTotal)
	{
        cell.Value = "Average"; 
	}
}


Then, for the total title for columns (which is actually the first cell of the last row of the table), use the 'Final Script' of the model:
Code:
@using System.Data
@{
    ReportModel model = Model;
    foreach (ResultPage page in model.Pages)
    {
        ResultTable dataTable = page.DataTable;
        dataTable[dataTable.Lines.Count - 1, 0].Value = "Average";
    }

}
thanks 1 user thanked epf for this useful post.
nimainship on 4/6/2022(UTC)
nimainship  
#3 Posted : Wednesday, April 6, 2022 1:14:39 AM(UTC)
nimainship

Rank: Newbie

Groups: Registered
Joined: 3/29/2022(UTC)
Posts: 7
Taiwan, Province Of China

Thanks: 2 times
This method is useful for me

Thanks.
Users browsing this topic
Guest (2)
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.