Use same formula with different fields as input
Posted on 2012-09-05
In a Crystal Report using Visual Studio 2008, I need to do the same formula calculation using two different data fields. The result is fed to another formula. Is there a way to specify which field I want to process as an argument to the formula, or am I stuck with having two virtually identical formulas, each hardcoded with the correct input field?
I've seen a couple of online references to a Function keyword, but I can't figure out how to use it. I tried to create a simple formula of:
Function (DateVar StartDate)
When I try to save the formula, CR reports back: "The remaining text does not appear to be part of the formula" and highlights everything.