Changing Total Expression Value at Runtime

edited 8:16PM in FastReport .NET
Hello,
I want to change total expression value at run time.
I use total on page footer.
Is it possible to set expression value conditionally in report events?

Thanks in advance.

Comments

  • edited 8:16PM
    Hello,

    It is possible.
        private void ReportTitle1_BeforePrint(object sender, EventArgs e)
        {
          Total totalProducts = Report.Dictionary.Totals.FindByName("TotalProducts");
          totalProducts.TotalType = TotalType.Sum;
          totalProducts.Expression = "[Products.UnitPrice] * 1.2m";
        }
    

Leave a Comment