Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Groups from Same Table Field

Status
Not open for further replies.

mabis

Technical User
Jul 22, 2006
25
US
Using Crystal 10.
Products in my database (SQL 200) are categorized into product levels. Ultimately, I want my report to group on those levels. For example:
GH1 =Level 1 (tblCategory.CategoryLevel=1)
GH2 = Level 2 (tblCategory.CategoryLevel=2)
GH3 = Level 3 (tblCategory.CategoryLevel=3)
GH4 = Products Width
GH5 = Products Height
Details 1
Details 2
Details 3
Bad news is the level information is all retained in one table call tblCategory with the following self explanatory field names:
CategoryID
CategoryLevel
CategoryCode
CategoryName
CategoryDescription
Can this be done? If so, guidance is appreciated.
 
Please show how these fields display if placed in the detail section. Please label the columns.

-LB
 
Lbass:
I added the following fields to the details section
CategoryLevel [1]
Width [.5625”]
Height [1.25”]
CategoryID [67]
CategoryCode [LL]
CategoryName [Laser/Ink Jet/Copier Labels]
CategoryDescription [Sheeted labels designed for laser, inkjet and copier printing]
An example of the records return is in [ ]s shown above.
There is a selection in place FYI . . .
{tblVendor.VendorName} = "Continental Datalabel" and {tblCategory.CategoryCode} = "LL"
I hope I am answering your question?
Mabis
 
No, all you have shown is one record's worth of data. I wanted to see how the Category level field relates to the other fields. I don't understand why you would want to group multiple times on the same field. If you group on the category level field, then you would get the other groups nested within level 1, then within level 2, etc.,. like this:

Level 1
Width .5625
Height 1.25
Detail 1
Detail 2
Height 2.5
Detail 1
Detail 2
Width .356
height .234
Detail 1
Detail 2
Height .135
Detail 1
Detail 2
Level 2
Width .5625
Height 1.25
Detail 1
Detail 2
Height 2.5
Detail 1
Detail 2
Width .356
height .234
Detail 1
Detail 2
Height .135
Detail 1
Detail 2
Level 3
Width .5625
Height 1.25
Detail 1
Detail 2
Height 2.5
Detail 1
Detail 2
Width .356
height .234
Detail 1
Detail 2
Height .135
Detail 1
Detail 2

I don't see the point of trying to show the three group headers first. Maybe you can clarify.

-LB
 
lbass:
You are right. Maybe its my strategy the stinks. How would you go about trying to accomplish this.. . As mentioned a product can be qualified in tbl.Category in levels 1, 2 and 3. I was trying to group by 1, 2 and 3 to narrow my results. You have shown that's not going to happen.

Instead how could I filter my detail results if for example I want CategoryCode to = LL when categorylevel=1 and categorycode to = GEN when categorylevel=2 and categorycode to = RED when categorylevel=3. Its that all of the data is residing in the same table that is throwing me.

Is there a way to do it as parameters?
 
(
categorylevel = 1 and
CategoryCode = 'LL'
) or
(
categorylevel = 2 and
categorycode = 'GEN'
) or
(
categorylevel = 3 and
categorycode = 'RED'
)

I'm not sure what you would want to parameterize. Can you be more specific about what you would want as user options?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top