Solved

Missing records when using 2 tables

Posted on 2002-03-12
7
208 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now