When you have finished editing the SQL expression, click the Save and Close icon in the upper left-hand corner to exit.
Sometimes when the syntax checker passes your expression, complex expressions may still fail when executed, because unfortunately the checker doesn't know everything; however, it will point out any basic errors or typos.
Only use the functions and operators supported by your database. If in doubt, consult with your database administrator on the correct usage of syntax.
Your SQL Expression should now appear in the list in the Field Explorer and you can drag and drop this field onto your report. The field should appear just like any other field shown on your report, showing that the SQL Expression itself has been added.
You can see that the SQL Expression can be identified as a % character and precedes the name, New Salary.
When your report runs or is previewed, this calculation will occur on the database server and the results are returned to your report, just like any other database field. This report you have created is the same as Employee_Profile_SQLEx.rpt, which is available in the code download for this book.
Was this article helpful?