I'm using the Add Command for an ODBC data source and building the query as follows:
select sum(Invoice_Detail.Amount) As Revenue
Inner Join Invoice_Header On Invoice_Detail.Document=Invoice_Header.Document
where Invoice_Detail.Job = 'REVENUE'
What I'd like to do is make the query dynamic and use a formula result that holds a shared variable from the main report instead of the Job value hard-coded above ('REVENUE').
Also, once I add this field onto my report, I can't figure out how to edit the query behind this field ??