JMO9966
asked on
Add Command - SQL query as Data Source for Report
Hello,
I'm using the Add Command for an ODBC data source and building the query as follows:
select sum(Invoice_Detail.Amount) As Revenue
From Invoice_Detail
Inner Join Invoice_Header On Invoice_Detail.Document=In voice_Head er.Documen t
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 ??
Thanks,
JMO9966
I'm using the Add Command for an ODBC data source and building the query as follows:
select sum(Invoice_Detail.Amount)
From Invoice_Detail
Inner Join Invoice_Header On Invoice_Detail.Document=In
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 ??
Thanks,
JMO9966
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys!
ASKER
I tried adding a parameter to the sql query itself but it error'd when I hit OK. I set it as a String type.
"To Few parameters, expected 1"