Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting an SQL query into a report

Status
Not open for further replies.

Firemyst

Programmer
Mar 10, 2003
62
US
I want to insert the following SQL statement into a standard crystal report we already have created.

Crystal Reports 8.5 doesn't want to allow me to do this unless I go through and create a whole brand new report.

This query is only for one field in the report. Is there some sort of workaround? I can't seem to figure out how to insert a field with this SQL driving it in the backend.

Please help! Thanks!


SELECT
Financial_Record.Division,
Monthly_Module.Month,
Monthly_Module.Year,
Sum(Monthly_Module.Expenditure_Amount) AS SumOfExpenditure_Amount
FROM
Financial_Record LEFT JOIN Monthly_Module ON Financial_Record.FinRec_ID = Monthly_Module.FinRec_ID
GROUP BY
Financial_Record.Division,
Financial_Record.[Record Type],
Monthly_Module.Month,
Monthly_Module.Year
HAVING
((Monthly_Module.Month=2) AND (Monthly_Module.Year=2003) AND
(Financial_Record.Division='ABC'));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top