Skip to Content
Former Member
Mar 09, 2009 at 09:43 PM

Can you use a formula field in a SQL command?


Crystal XI R2

I have a couple formula fields I'd like to use in my query. The formulas get their data from parsing a date parameter that allows a range.

Data is from an ADO connection to an SQL Server Database.

Under Database Expert, on Data Tab, under "Selected Tables" there is a command named "Command", which has my SQL. When I right click on that and choose "Edit Command" there are two input areas: "Enter SQL Query In the Box Below" and "Parameters list"

The command works as it is, now I want to use formula fields.

Is there a way to do that, e.g., can I refer to something like "@endDate" in my query, if my formula field is named "endDate"?


I understand that might not be possible by design, becuase formulas might have changing values and the database query shouldn't keep re-running.