Solved

Missing records when using 2 tables

Posted on 2002-03-12
7
211 Views
Last Modified: 2008-03-10
Using [2] Foxpro tables to build report.  Grouping on GLACMST.GLNO yields ALL GLNOs as expected.  When I add details (the GLNO fields in each table are indexed and linking properly) from the second table NONE of that data displays--if I format the section to [Suppress blank section] it IS suppressed.

I've built this several different ways: when pulling in the GLTRMST table first and using GLNO from that table all the data from both tables displays in the Details section ok...but I need to show ALL GLNO from the GLACMST table-which is the complete list.  The second table shows active transactions so not all GLNOs will have records from that table.

Sooo...how do I keep the report grouped on GLACMST.GLNO, and pull in the additional info from the GLTRMST table??
Thanks,
Kathy
0
Comment
Question by:kmay
  • 3
  • 3
7 Comments
 
LVL 1

Expert Comment

by:ssam
ID: 6857756
try a left outer join on the first table since not all GLNOs will have records from your second table as you stated in the second paragraph.  hth.  ---ssam
0
 

Author Comment

by:kmay
ID: 6857991
Hi,

I am unable to choose a link type - all options are grayed, only 'Equal Join' is allowed.  I have changed  the 'From' table to GLACMST- this returns all the GLNOs, but still no details are returned which are pulling from the GLTRMST table???

When adding the database I selected [Database Files | Find Database File]...should I have added the table using a different method??

Thanks,
Kathy
0
 
LVL 6

Accepted Solution

by:
dbirdman earned 200 total points
ID: 6858575
If you have the Query Designer Component with your Crystal Package, you can use it to create a Query file (.qry), then select the Query File as your Report Source, just like you do with a Database (Look under the Dictionary/Query Folder under the Add Database Menu Option).  You can use the Query Builder to specify the tables and join properties for the query, so that what your report sees is a record set with all of the data it needs.

Hope this helps.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:kmay
ID: 6861801
Hi,

Ok...so now I've had a crash course in Query design!  The data is showing up as needed...however there is a glitch. Any date field which in the original database is empty displays on the report as 12/30/1899 (yep not a TypeO).  

Well my boss, a Foxpro guy, went in and corrected that by modifying the FPro files...But, now I've just finished another report-different tables etc...and all null date fields are displaying 12/30/1899...any clues to where this is being generated and more importantly how do I resolve this?  I puled this data straight from the .dbf - no query.

Thanks for the help!
Kathy
0
 
LVL 6

Expert Comment

by:dbirdman
ID: 6861935
I'm not sure why you get 1899; it's probably a Crystal Reports Assumption.  One way you can control this is to either set up a Function Field for the date and put it on the Report, or right-click on the Date field on the Report and insert a conditional formatting expression.  The expression might look like this:

IIF(MyField = "", Date(), MyField)

In this example, if MyField is Null, I use the current Date, otherwise I use the value within the field.

Good Luck.
0
 

Author Comment

by:kmay
ID: 6862115
Well...I'm not too happy about Crystal assuming anything!!

Thanks for the help!
Kathy
0
 
LVL 6

Expert Comment

by:dbirdman
ID: 6862479
I'm not sure why you get 1899; it's probably a Crystal Reports Assumption.  One way you can control this is to either set up a Function Field for the date and put it on the Report, or right-click on the Date field on the Report and insert a conditional formatting expression.  The expression might look like this:

IIF(MyField = "", Date(), MyField)

In this example, if MyField is Null, I use the current Date, otherwise I use the value within the field.

Good Luck.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question