Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Join issue when linking command and table Post Reply Post New Topic
Author Message
jrchieppa
Newbie
Newbie


Joined: 19 Jan 2009
Location: United States
Online Status: Offline
Posts: 1
Quote jrchieppa Replybullet Topic: Join issue when linking command and table
     Posted: 19 Jan 2009 at 6:45pm
I have a table and a command that uses a select statement.  The table is joined to the command on empno and chkdate(left outer join).  The field types in the table are the same as the field types in the table from which the select in the command is using.  The chkdate field is a date field.
 
The problem I'm having is when I join the table to the command and run a report I only get data from the table.  No matches from the select.  I added a trim(table.empno)=trim(command.empno)  and removed chkdate from the join and recevied results.  This was done to test the match on empno.  So it seems the command is adding spaces to the beginning of the empno and chkdate.  I tried to add a trim(chkdate) to the join statement but it errored off stating the command was invalid. 
 
1)  Why is the command (using a select statement) adding spaces to the empno and chkdate fields?
2) Is there a way to trim the spaces from the chkdate field and join to chkdate from the table?
 
Jeff
 PS
using Crystal X and Foxpro database backend  
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 20 Jan 2009 at 6:29am
Interesting.  I don't know.  I would probably try converting the dates to strings and trimming them...what a pain.
 
Why are you joining a command and table?  Commands, at least the way that I have seen them used, are for populating parameter lists.  If you want Crystal to join the tables, just set them up in the data source, you can tell it make it a left outer join in the link.
 
Hope this helps
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum