Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1425
Problems using Summaries with Formulas built from FormulaBuilder dialog...
posted

Hi all,

I'd like to allow the user to build their own formula for a new Summary in a WinGrid. Currently, the user can select a column for the summary to be placed under, create a new formula using the FormulaBuilder dialog, and this adds a new summary with the specified formula, under the selected column.

In addition to this, a report is generated from the grid which is also required to display these formulas as they are in the grid. (I use the GridDocumentExporter for this)

I have two problems which are both specific to summaries placed at each Group level. The Grand Summary level displays the correct value, as desired, however...

  1. If one or a number of the columns in the Grid are grouped by, the values will not be displayed for those summaries at each group level. The label e.g. "Max =" is displayed, but not the value. When the user ungroups and regroups by that column, the value appears!
  2. When generating the report using the GridDocumentExporter, the same occurs...the summary appears correctly at the Grand Summary level, but not at any Group Level (just the label).

These issues seem linked, but I still can't figure out what is wrong...

When creating the summaries I pass the FormulaBuilder a new summary as an IFormulaProvider. When the user has successfully specified a formula, this is applied to the Formula property of the Summary.

The summary used is what is returned from this (SummarySettings object):

Summaries.Add(formulaId,

SummaryType.Formula, column, SummaryPosition.UseSummaryPositionColumn);

"formulaId" is a string and "column" is an UltraGridColum in the Grid.

Any ideas would be greatly appreciated!

Cheers,

Richard