Hi all!
I am using Crystal Reports 10.
I have the following database tables
Item
ItemID
Description
ItemProperty
ItemID
PropertyCodeID
PropertyCode
PropertyCodeID
PropertyNameID
Code
Description
ProprtyName
PropertyNameID
Description
The Setup
The main table is Item, which stores certain items in my database. Now, each item has a varying number of properties, and instead of creating about 20 fields right inside the item table, I decided to store item properites in a separate table, called ItemProperties. So data about items is stored in the ItemProperties table.
So far so good. Now, the value of each property is a code, which the user creates to associate a description. Thus, when entering age data, for instance, the user would enter code 1, which means 0-10 years old, code 2, which means 11-20 years old, and so on. Thus, in the PropertyCode table, I simply store all the codes the user has created. This is a typical entry in the tables:
[tt]
Item
ID: Description:
1 My dog
ItemProperty
ItemID PropertyCodeID
1 1
1 2
1 3
PropertyCode
PropertyCodeID PropertyNameID Code Description
1 1 1 Spike
2 2 1 Black
3 3 1 0-11 years old
PropertyName
PropertyNameID Description
1 DogName
2 DogColor
3 DogAge
[/tt]
Ok, so from the above, you can see that I have an item which is a dog; his name is spike; he's black, and his age is 0-11 years.
The Problem
I have a Crystal Report and I want it to display each item, with all its properties. The report should show a title banner display the property names which should serve as column heading. Then, each item should be displayed... one row per item. At the moment, however, I get three rows for every item (one row per every property of the item). How can I display one item per row?
Right now, I have formulas which return property code descriptions sitting right on the Details section of my report. But, like I said, for every item, I'm getting multiple rows (one row, for every property). Can anyone please shed some light?
Thanks!
JC
Can anyone please tell me how to get around this problem?
Thanks
_________________________________________________
To get the best response to a question, read faq222-2244.
I am using Crystal Reports 10.
I have the following database tables
Item
ItemID
Description
ItemProperty
ItemID
PropertyCodeID
PropertyCode
PropertyCodeID
PropertyNameID
Code
Description
ProprtyName
PropertyNameID
Description
The Setup
The main table is Item, which stores certain items in my database. Now, each item has a varying number of properties, and instead of creating about 20 fields right inside the item table, I decided to store item properites in a separate table, called ItemProperties. So data about items is stored in the ItemProperties table.
So far so good. Now, the value of each property is a code, which the user creates to associate a description. Thus, when entering age data, for instance, the user would enter code 1, which means 0-10 years old, code 2, which means 11-20 years old, and so on. Thus, in the PropertyCode table, I simply store all the codes the user has created. This is a typical entry in the tables:
[tt]
Item
ID: Description:
1 My dog
ItemProperty
ItemID PropertyCodeID
1 1
1 2
1 3
PropertyCode
PropertyCodeID PropertyNameID Code Description
1 1 1 Spike
2 2 1 Black
3 3 1 0-11 years old
PropertyName
PropertyNameID Description
1 DogName
2 DogColor
3 DogAge
[/tt]
Ok, so from the above, you can see that I have an item which is a dog; his name is spike; he's black, and his age is 0-11 years.
The Problem
I have a Crystal Report and I want it to display each item, with all its properties. The report should show a title banner display the property names which should serve as column heading. Then, each item should be displayed... one row per item. At the moment, however, I get three rows for every item (one row per every property of the item). How can I display one item per row?
Right now, I have formulas which return property code descriptions sitting right on the Details section of my report. But, like I said, for every item, I'm getting multiple rows (one row, for every property). Can anyone please shed some light?
Thanks!
JC
Can anyone please tell me how to get around this problem?
Thanks
_________________________________________________
To get the best response to a question, read faq222-2244.