Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping on Empty results?

Status
Not open for further replies.

alie123

Technical User
Apr 6, 2005
24
GB
Hi All

I'm using crystal 8.5 and have a report which is looking at several accounting tables. One table (table A) contains a record of nominal codes which are unique and each nominal record has fields holding budgetary data. This table is then joined using a left join to a larger table (table B) that contains all accounting transactions and this table in turn contains lots of left joins to other tables that hold accounting data.

The report is set-up so that the accounting entries from a transaction (e.g. records from Table B) are grouped together and the total of the transaction is then shown in a group header. The report is set-up to show only transactions that contain a specific nominal code. The group header also contains a number of extra sections that holds the budgetary data from Table 1 for the specific nominal code.

The problem that I appear to have is that the budget data from table 1 does not appear if there are no transactions, when there are transactions its okay. I would have thought that the left outer join from Table 1 would mean that even if a nominal code has no transaction records a single record would be reported that contains empty fields from table 2 but all fields for the record in table 1?

When I run the report and choose a code that has no transactions Crystal shows that it has found 1 record (this must be the nominal record from table 1?) but the fields are blank? is there a way to check the contents of the record?

I don't understand why the fields would be blank? could it be that because the grouping on the report is based upon fields from Table 2 (which are now empty) that the reported record is empty too??

Any help, as always, would be greatly appreciated
 
What are your record selection criteria? If you select based on fields from tables to the right of a left join, the join will be compromised.

-LB
 
Hi

The selection criteria is to show all records from table one (the left table) where the nominal code is equal to the selected nominal code.

A
 
Are you sure you are selecting on the nominal code from the first table and not the second?

-LB
 
Actually, I think this is because of your grouping. If you add an inner group (Group #2) on the code from Table1, it will force a null group for those codes not in Table2.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top