Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: using data from 1 of 3 tables Post Reply Post New Topic
Author Message
dfalconer
Newbie
Newbie
Avatar

Joined: 06 Aug 2009
Location: Australia
Online Status: Offline
Posts: 1
Quote dfalconer Replybullet Topic: using data from 1 of 3 tables
     Posted: 06 Aug 2009 at 7:21pm
hello every one and hope some one can help.
 
im not looking for direct answers but simple guidance to solve this.
 
i work as support for ERP software and in this database is 3 tables a customer individual price table (ie if that customer has his own prices for products then its here its stored)
group price tabel(ie if 10 customers are part of a group lets say builders and they pay 10% more for some products then its foundhere)
then standard prices
 
so lets say i have 10 products i have a standard price for each product
i have customer x who is part of the builders group
he has 4 special prices because i like him and 2 prices for the builders group.
 
so that means he pays standard price for 4 of the 10 products also.
 
i need to generate a report to give the customer a price list.
it should just list the 10 products and next to the product first if he has his own price if not then a group price and if not a standard price.
 
it doesnt seem too hard to get my head a round but im assuming i need a formula (using null values and certain joins).
the table linking confuses me because i would assume linking by product code, this column is common in all tables how ever not all products exist in each table
 
prods       stand $    grp $              cust $
1                $x                  
2                $x           $x                    $x
3                $x          
4                $x
5                $x           $x
6                $x                        
7                $x           $x                    $x
8                $x           $x
9                $x           $x                    $x
10              $x                                   $x
 
as you can see this is how the data exists in this database
 
any advice is greatly apprecated
IP IP Logged
gavsmith
Newbie
Newbie


Joined: 06 Aug 2009
Online Status: Offline
Posts: 10
Quote gavsmith Replybullet Posted: 07 Aug 2009 at 4:17am
Make sure you link all the tables correctly then create a formula field 'price'...
 
if (Not IsNull({cust$})) then
  {cust$}
else if (Not IsNull({grp$})) then
  {grp$}
else
   {stand$}
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