Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Possible to link the tables? Post Reply Post New Topic
Author Message
tanger
Newbie
Newbie


Joined: 12 Jul 2010
Online Status: Offline
Posts: 1
Quote tanger Replybullet Topic: Possible to link the tables?
    Posted: 12 May 2011 at 12:54pm
Dear All,
 
 
I am trying to create a pricelist based on a customer that is entered by the user of the report.
 
The itemcode, item description, item group and price are all in one table. There is also a discount table which contains percentage discounts for a particular customer based on different item groups.
 
Things would seem fairly easy as the two tables have what appear to be a linking field, the problem I have is the field that is in the discount table that matches up with the item table is of a different type.
 
Item table entry - ITEMGROUPCODE - 100 (type number)
Discount table entry - OBJECTCODE - 100 (type string)
 
Because of this I'm unable to connect the two tables, is there a way around this? Or do I have to have some sort of subreport and the passing of a 100 or so values?
 
Any comments/help are greatly appreciated.
 
Troy
 
IP IP Logged
c16271
Groupie
Groupie
Avatar

Joined: 24 Aug 2010
Location: United States
Online Status: Offline
Posts: 48
Quote c16271 Replybullet Posted: 13 May 2011 at 12:55pm
you can convert the itemgroupcode to a string, and then set them equal to each other:
 
1. Go to Report Toolbar
2. Selection Formulas
3. Choose Record...
 
In the formula text box, select:
 
4. Expand the "Field Tree"
5. Find the "ITEMGROUPCODE" field in the corresponding table, double-click on it.
 
You should now see it in the text box, as {field_name}, eg, {ITEMGROUPCODE}.
 
6. Convert ToText and set equal to
 
ToText({ITEMGROUPCODE }) = {OBJECTCODE}
 
 
This is a very simple fix--but if you can't follow my instructions, please post where you are now, maybe we can walk through it..
 
 
 


Edited by c16271 - 13 May 2011 at 12:56pm
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.