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: Join tables together with a UNION join

Sometimes, we need to have a record appear in more than one place in our Crystal Report. Examples of this include stock movements in and out of the warehouse, or call centers where calls come in and get resolved. If you want to display activity or status on a series of days, the same call or stock item needs to appear on several days.

One solution to this problem is to use SQL to create a different view of the data. A UNION join will combine a series of tables into one recordset for your report:

SELECT "In" as CallType, InDate as CallDate, CallID from Calls

UNION ALL

SELECT "Out" as CallType, OutDate as CallDate, CallID from Calls

The UNION ALL includes duplicate records, otherwise a UNION is adequate. You can also combine several of these if you want stock status at different dates. You can’t do this with the SQL inside Crystal Reports but you can use this technique if you can create SQL views or queries in your database. You can also do it in the Crystal SQL designer.

 

 

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: union join, record appear in multiple places in report, reusing records in reports, include duplicate records, crystal reports tutorials, crystal reports tips, crystal reports articles, crystal reports information, crystal reports tips, crystal reports help, crystal reports training