Crystal Reports Tools: Improve Performance While Saving Time and Money

  Resources  
Best sellers:
cView
Report Analyzer
cViewSERVER
ReCrystallize
 

Buy Crystal Reports


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

CR trial
 

Crystal Reports
on Steroids

Crystal Reports: SQL Left Join

There are many ways to do a left join to a table with record selection. Luqman at Pearl Soft in Pakistan provided this SQL-based method of doing so. Use a SQL select statement as follows:

SELECT A.CUSTOMERID, SUM(C.QUANTITY) FROM CUSTOMERS A
LEFT JOIN ORDERS B ON A.CUSTOMERID=B.CUSTOMERID
LEFT JOIN [ORDER DETAILS] C ON B.ORDERID=C.ORDERID
ND B.ORDERDATE BETWEEN '19960704' AND '19960730'
GROUP BY A.CUSTOMERID

The secret is to set your filter in the JOIN clause, rather than the WHERE clause.

 

 

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.