Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: string length and data compatibility Post Reply Post New Topic
Author Message
pgiering
Newbie
Newbie


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 37
Quote pgiering Replybullet Topic: string length and data compatibility
     Posted: 23 Oct 2009 at 12:19pm
Hi, I'm using two tables in CR 10, each table contains a field which I am trying to use as a key to match records, but it is not working.
 
The first table is a transaction table, which contains the field "VenNo" which is the Vendor Number associated with any transaction.  The "VenNo" field is defined as a string 10 characters long, of which we use only the first six, as our vendor numbers are uniformly defined as three alpha and three numeric characters (eg- xxx111, yyy222, etc).
 
The second table is a vendor record table, which also contains the "VenNo" field, but it is defined as a string 8000 characters long (it is however the same actual data though, if I pull up the field with out trying to link the two tables, I can see it is the same data, in the same format of xxx111, yyy222, etc).  The table also contains the Vendor Name associated with the vendor number, which is what I'm really after.
 
I have tried everything I can think of, but despite being linked (and trying various types of joins), whenever I drop either field from the second table in the report, all the data dissapears.
 
Any suggestions???
 
Thanks,
 
Paul
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Oct 2009 at 12:36pm
What is your data source type? If sql do you have rights to create views or stored procs?

Edited by DBlank - 23 Oct 2009 at 12:37pm
IP IP Logged
pgiering
Newbie
Newbie


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 37
Quote pgiering Replybullet Posted: 23 Oct 2009 at 12:42pm
They are both strings.  Is that what you are asking?  The tables are part of our Finesse ERP. 

Edited by pgiering - 23 Oct 2009 at 12:48pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Oct 2009 at 12:43pm

Is your source Access, Excel, SQL, etc.?

IP IP Logged
pgiering
Newbie
Newbie


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 37
Quote pgiering Replybullet Posted: 23 Oct 2009 at 12:53pm
DBLank,
 
The tables are part of our Finesse system, and I believe they are SQL, but I am not entirely sure.  Working with databases is not part of my core skill set, so I'm kind of winging it here.  :)
 
I believe I can do both of those, although I do not know how to do either.
 
Paul
 


Edited by pgiering - 23 Oct 2009 at 12:54pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Oct 2009 at 1:15pm
NOt sure but you can try adding a Command in Crystal and trimming the fields to see if you get any data that way.
here is a reference link:
http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7003
 
Your command will be something like:
SELECT     table1. *, table2.*
FROM         table1 INNER JOIN
                      table2 ON rtrim(table1.VenNo) = rtrim(Table2.VenNo)
 
You can also try doing this in a View or Stored Proc in SQL and then using the View or SP as your data source.
 
Anyone else see an easier approach here?
IP IP Logged
pgiering
Newbie
Newbie


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 37
Quote pgiering Replybullet Posted: 23 Oct 2009 at 3:16pm
DBlank,
 
Thank you!  Before reading your comment I didn't even know there was an option to add a command.  I read through the link you provided, did a quick read of some help text in CR, then tailored your suggested command to meet my table names, and walla!  It worked great!
 
Thanks for the terrific fix!
 
Paul
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