I am using Crystal 8 run through Delphi 7. I want to group the report by the description name that I typed in with the parameter list. Is this possible?
In SQL, and in Crystal, grouping occurs on DATA, not on parameters. Have you ever heard of someone writting a stored procedure which groups on a parameter passed? parameters aren't data, sql groups on data.
To further annoy you, Crystal built in the description to allow for display, but you can't reference it in code (annoys me anyway).
So create a formula to group on, such as:
if {table.field} = 1 then
"My first group"
else
if {table.field} = 2 then
"My Second group"
else
"N/A"
Make sure that the names will sort properly alphabetically, or you can group by whatever field is appropriate and use the above formula for display purposes.
Thanks.
My dilemna is that I am grouping on an inventorycode which consists of a locationcode(quarter and year). for example
50(Q106). The customer gets to the inventory code by matching 3 parameter (the location code, the quarter and the last 2 digits of the year )The customer wants me to display the city field associated with the location code as the group name.
I do not know a way to link the inventory table with the location table. I use the formula:
InvCode := trim({Inventory.INVCODE});
Left (InvCode,len(InvCode)-6)
to get to the locationcode and it will not let me group on the formula. I tried using this formula and passing it to a subreport where I get the city field. It works on my end but gives the customer an out of bounds error.
Any ideas?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.