Search code examples
c#visual-studio-2005crystal-reports

How to programmatically change a Crystal Reports formula from Crystal Syntax to Basic Syntax - in Visual Studio 2005


I want to programmatically change formulas in a whole lot of reports, like in this question, but I also need to change the formula between Crystal Syntax and Basic Syntax. I can't see any way to do this in the object model. Is it possible?

i.e. I have a formula called 'Period' that already exists in a whole lot of reports, and it's currently defined in Crystal Syntax. I want to set the formula to be in Basic Syntax and provide updated text of the formula. I don't need to automatically convert the current definition from crystal to basic; I already have the new formula text.

If I simply loop through all the reports, open them, then set the FormulaFieldDefinition's Text property then the formulas are still set to 'Crystal Syntax' and won't evaluate correctly. Currently my only solution is manually opening each report, editing the formula, changing the dropdown from Crystal Syntax to Basic Syntax.


Solution

  • I believe and @CodeByMoonlight confirms that this isn't available. So for anyone in the same boat as me with many reports to update: enjoy that manual process and hope you never have to change back!