Changing Total Expression Value at Runtime

edited 6:52PM 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 6:52PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.