Dynamically Add and Remove both Formula Fields and SQL Expression via C#
I found an example of how to loop through Formula Fields and SQL Expressions on a report but how do I add new ones and delete old ones through C# code?
foreach (CrystalDecisions.CrystalReports.Engine.FormulaFieldDefinition myFormulaField in customerReport.DataDefinition.FormulaFields)
myName = myFormulaField.Name;
foreach (CrystalDecisions.CrystalReports.Engine.SQLExpressionFieldDefinition mySQLField in customerReport.DataDefinition.SQLExpressionFields)
myName = mySQLField.Name;