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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping by an Alias Created

Status
Not open for further replies.

BoeingSK

Technical User
Nov 2, 2007
36
US
I have an extensive report that I had to use a command to pull in the data. It was a count of each part number that we have ordered over our history the last two years.
I was able to create an ALIS to group all partnumbers by distinct number with the count of that number.

Now I want to Group all the one time,two time, etc buys together but when I go to group on this Alias field it doesn't show up in the Group by tree.

Up and Coming Technical Guy
 
Are you saying that this new field created in the command is not found in the dropdown list when you go to the toolbar->insert->group?

-LB
 
Are you wanting to arrange groups by the number of detail records in the group? That's Top N, click on a group section and choose [Change Group].

It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
To answer Lbass question first, No only the fields from the tables are in the drop down not the Alias created Field.

Madawc,Yes, for instance I have 5 part numbers that have been ordered 6 times , instead of showing all details I only want to show a Group Label of 6 with 5 partnumbers in that group.

Sorry for the Delay on the Answer, Happy belated Thanksgiving.



Up and Coming Technical Guy
 
Can you paste command. There is no reason why your summary field is not available (provided it is s true field) for grouping.

Ian

 
Top N will let you show by number in a group. I don't think you can group by that, except very inefficiently by having a set of subreports that each suppress groups that have a different number.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Here it is:

SELECT (Select count(A."PARTNUMBER") from "PO_LINE" A
where A."PARTNUMBER" = "PO_LINE"."PARTNUMBER") "Occurrences",
"PO_HDR"."DOC_NO", "PO_LINE"."PARTNUMBER", "PO_LINE"."ADDED_DTE",
"PO_LINE"."UNITP", "PO_LINE"."QORDER", "PO_LINE"."SUBTOTAL",
"PO_LINE"."STATUS", "PO_HDR"."CUST_REF3", "PO_HDR"."CUST_REF4",
"PO_HDR"."DOC_TYPE", "STOCK"."STK_TYPE", "STOCK"."CATEGORY",
"PO_HDR"."DOC_STATUS"
FROM "GDB_01_BOEING3"."dbo"."STOCK" "STOCK" RIGHT OUTER JOIN
("GDB_01_BOEING3"."dbo"."PO_HDR" "PO_HDR" FULL OUTER JOIN
"GDB_01_BOEING3"."dbo"."PO_LINE" "PO_LINE" ON
"PO_HDR"."DOC_NO"="PO_LINE"."DOC_NO") ON
"STOCK"."PARTNUMBER"="PO_LINE"."PARTNUMBER"
WHERE "PO_HDR"."CUST_REF3" LIKE '0%' AND "PO_HDR"."DOC_STATUS"<>11 AND
"STOCK"."STK_TYPE"='STK'
ORDER BY "PO_LINE"."PARTNUMBER", "PO_HDR"."DOC_NO"




Up and Coming Technical Guy
 
I DO APOLOGIZE TO ALL, OI WAS ABLE TO GROUP BY THIS FIELD. I WAS NOT ABLE TO DO A HIGHER GROUPING, WHEN I GROUPED BY OCCURENCES WHICH IS THE ALIAS, I COULDN'T GET IT TO SINGLELY GROUP ALL 1 OCCURENCES, 2 OCCURENCES, ETC.

Up and Coming Technical Guy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top