J
joshblair
Hi,
I am trying to get a report built with varying number of columns across
the top based on the contents of 5 QTY fields (Qty_1, Qty_2, Qty_3,
Qty_4, Qty_5) but the quantities don't always coincide with one
another. Sometimes the quantities are all the same: (500, 1000, 5000,
10000, 25000), and sometimes they differ: (1000, 5000, 10000, <null>,
<null>)
Here is an axample of what this report might look like for a given part
number (not represented by the sample data below):
500 1000 2500 5000 10000 25000
==== ==== ==== ==== ===== =====
Supplier A $1.00 $ 0.90 $0.85 $0.80 N/A $0.80
Supplier B $1.45 $1.40 $1.35 $1.30 $1.25 N/A
Supplier C N/A $2.15 $2.15 $2.15 $2.15 $2.15
=================================================================
I have some data in a table that contains the following fields:
ID
SupplierID
SupplierName
PartNumber
PartDesciption
Qty_1
Price_1
Qty_2
Price_2
Qty_3
Price_3
Qty_4
Price_4
Qty_5
Price_5
ID SupplierID SupplierName PartNumber PartDesciption
Qty_1 Price_1 Qty_2 Price_2 Qty_3 Price_3 Qty_4 Price_4 Qty_5
Price_5
1 2000 Supplier A 1000 8wt Fly Reel
500 $1.50 1000 $1.40 2500 $1.25 5000 $1.10 10000
$1.00
2 2200 Supplier B 1000 8wt Fly Reel
1500 $1.50 2000 $1.25 2500 $1.10 5000 $1.00 15000
$0.90
3 2300 Supplier C 1000 8wt Fly Reel
500 $1.75 1500 $1.50 2000 $1.25 4500 $1.15 10000
$1.00
4 2000 Supplier A 2000 8wt 4pc Fly Rod
100 $50.50 500 $40.40 1000 $35.25 2000 $30.10 3000
$25.00
5 2200 Supplier B 2000 8wt 4pc Fly Rod
1000 $40.50 2000 $35.25 3000 $30.10 4000 $28.00 5000
$25.90
6 2300 Supplier C 2000 8wt 4pc Fly Rod
500 $45.75 1500 $42.50 2000 $40.25 4500 $38.15 10000
$30.00
Question 1: Is this possible?
Question 2: Would I accomplish this using one or more crosstab queries?
Question 3: What other guidance can you offer?
Thanks in advance for your time and information.
I am trying to get a report built with varying number of columns across
the top based on the contents of 5 QTY fields (Qty_1, Qty_2, Qty_3,
Qty_4, Qty_5) but the quantities don't always coincide with one
another. Sometimes the quantities are all the same: (500, 1000, 5000,
10000, 25000), and sometimes they differ: (1000, 5000, 10000, <null>,
<null>)
Here is an axample of what this report might look like for a given part
number (not represented by the sample data below):
500 1000 2500 5000 10000 25000
==== ==== ==== ==== ===== =====
Supplier A $1.00 $ 0.90 $0.85 $0.80 N/A $0.80
Supplier B $1.45 $1.40 $1.35 $1.30 $1.25 N/A
Supplier C N/A $2.15 $2.15 $2.15 $2.15 $2.15
=================================================================
I have some data in a table that contains the following fields:
ID
SupplierID
SupplierName
PartNumber
PartDesciption
Qty_1
Price_1
Qty_2
Price_2
Qty_3
Price_3
Qty_4
Price_4
Qty_5
Price_5
ID SupplierID SupplierName PartNumber PartDesciption
Qty_1 Price_1 Qty_2 Price_2 Qty_3 Price_3 Qty_4 Price_4 Qty_5
Price_5
1 2000 Supplier A 1000 8wt Fly Reel
500 $1.50 1000 $1.40 2500 $1.25 5000 $1.10 10000
$1.00
2 2200 Supplier B 1000 8wt Fly Reel
1500 $1.50 2000 $1.25 2500 $1.10 5000 $1.00 15000
$0.90
3 2300 Supplier C 1000 8wt Fly Reel
500 $1.75 1500 $1.50 2000 $1.25 4500 $1.15 10000
$1.00
4 2000 Supplier A 2000 8wt 4pc Fly Rod
100 $50.50 500 $40.40 1000 $35.25 2000 $30.10 3000
$25.00
5 2200 Supplier B 2000 8wt 4pc Fly Rod
1000 $40.50 2000 $35.25 3000 $30.10 4000 $28.00 5000
$25.90
6 2300 Supplier C 2000 8wt 4pc Fly Rod
500 $45.75 1500 $42.50 2000 $40.25 4500 $38.15 10000
$30.00
Question 1: Is this possible?
Question 2: Would I accomplish this using one or more crosstab queries?
Question 3: What other guidance can you offer?
Thanks in advance for your time and information.