right click on Formulas...under Database in the Report Explorer and select New.
Give it a name, and it will open the Formula Editor
OOPS, that is create a formula in Crystal.
There isn't a 'formula' in SQL. What we are speaking of in SQL is either a function or a stored procedure or a view. A view and a stored procedure are similar, they usually return something that looks like a table. A function is something that can be called by a select statement and may return a value or a table.
The web is full of sites to assist in creating these / the syntax.
Rahul's post is how to create a function and how to call it.