Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse BIRT Report Developer Guide
Previous Page Home Next Page

Previous Next

The database contains customers that do not have orders or payments. The query for the customers report returns all customers. When you run the report, there are customer rows that show only the column headings for the Orders and Payments tables, as shown in Figure 13‑25.

Figure 13-25 Report shows no order or payment data for one customer

You can exclude customers that do not have orders or payments by changing the query for the customers report.

WHERE
EXISTS
(SELECT Orders.customerNumber
FROM Orders
WHERE Customers.customerNumber =
Orders.customerNumber)
OR
EXISTS
(SELECT Payments.customerNumber
FROM Payments
WHERE Customers.customerNumber =
Payments.customerNumber)
The WHERE EXISTS clause checks the Orders and Payments tables for customerNumber values that match the customerNumber values in the Customers table. Only rows that have matching customerNumber values are selected. The complete query should look like the one shown in Figure 13‑26.

Figure 13-26 Updated SELECT query in Edit Data Set

5
Preview the report. Scroll down the report to check the output. The report no longer displays customers that do not have orders or payments.

(c) Copyright Actuate Corporation 2009

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire