Crystal Reports Tools: Improve Performance While Saving Time and Money

  Resources  
Best sellers:
cView
Report Analyzer
cViewSERVER
ReCrystallize

Crystal Reports: Free trial

Articles:
Administration
Advanced
Basic
Crystal eNL
Database

Financial
Problems Solved

Books:
CR Books

Database Books
Developer Books
Tools:
All CR Tools
CR Analyzers
CR Bestsellers
DataBase Tools
CR Graphics
International
CR Mail UFLs
ReCrystallizePro
CR Schedulers
CR UFLs
CR Viewers

Add'l:
About us

Contact Us
cViewSUITE Ppt
Support

Crystal Reports
on Steroids

Crystal Reports: SQL Expressions and Sub Selects

One of the more advanced technical sessions at a late 2006 conference was Kurt Rheinhardt’s talk on “the Power and Possibilities of SQL expressions”. Kurt is a very experienced report designer and he demonstrated some amazing things with SQL expressions. You can find him at www.acuityreporting.com

In particular, we were impressed to see you could do sub select clauses inside SQL expressions. If you can use these in your reports, performance improvements can be dramatic.

Our sample report extracts a few customer names from the Xtreme sample database. We then created a SQL expression of:

(Select Sum("Order Amount") from Orders

where "Customer ID"=`Customer`.`Customer ID`)

The report before using the SQL expression returned six records from the region we selected. Using the SQL expression we still had six records, and had got the database to do all the hard work.

The key to making this work is to enclose the entire expression inside parentheses. It is also important that the subselect clause returns a single record with a single field.

Because SQL expressions are calculated in the database, the entire select clause is passed to the database

engine to evaluate. This is a fast way to process the data. The major disadvantage of SQL expressions is that they are database and driver specific. Kurt recommends you build your SQL using a SQL editor. Once you have that working, you can paste the SQL into the SQL expression in the report.

Used this way, One SQL expression can replace a subreport that returns a shared variable. It simplifies your report and makes it faster to run, and easier to design.

Report Analyzer

Document your SQL expressions with Report Analyzer:
http://www.crystalkeen.com/crystalreporttools/analyze/

With this powerful tool, you can:

  • Discover unused formulas, fields, and variables.
  • Identify group settings which cause blank pages and footers.
  • Identify missing standard Crystal documentation best practices (Report Title, Author, Description special fields).
  • Locate reports which may use the "Convert null field to default" setting inconsistently.
  • Keep versions of your documented reports for historical comparison.
  • Automatically detect reports that do not take advantage of server side database processing.
  • Detect record selection formulas which use data type conversion functions.
  • Detect group fields which use formulas instead of SQL Expression fields.
  • Find report tables which use less than an optimal number of fields.
  • Discover special fields which cause an additional pass over the report data source.
And so much more! Click here to see what you're missing by not having Report Analyzer.

 

 

This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects.

These keywords may have brought you here: SQL commands, crystal reports audit records, conducting record audits, crystal reports tutorials, crystal reports articles, crystal reports information, crystal reports software, crystal reports training, crystal reports downloads, crystal software, crystal downloads