Please post the formula for the field you are trying to group on. Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
GH1:ReportSelect
If {?Center} = 'HOPKINS' then 'HOPKINS'
ELSE
IF {?Center} = 'PORTLAND' THEN 'PORTLAND'
ELSE
IF {?Center} = 'ALL' THEN 'TOTAL SBLC'
ELSE
'MILWAUKEE'
with ?Center being a string of 4 values:HOPKINS,PORTLAND,MILWAUKEE,ALL
GH2: bankstate_number
"BANK" & " " & {ACCOUNTX.BANKSTATE_NUMBER}
GH3:
If {ACCOUNTX.DIVISION_CODE} in [001,002,012,014,015,018,022,619,042,043,044,045,046,047] then 'METRO' else 'COMMUNITY'
GH4:
"RISK RATING " & {RACCOUNT.USER_TEXT_1}
I changed my report to add a PARAMETER so the user could
select data by SITE:
The report selection criteria are:
{ACCOUNTX.OBLIGATION_NUMBER} <> " " and
{RACCTREL.REL_POS} = "1" and
iif({?Center}="Hopkins",({RACCOUNT.REASON_INTO_COL} in ["860","861","862","864"]) or
({RACCOUNT.REASON_INTO_COL}="869" and (({@Division} = 'COMMUNITY' and {ACCOUNTX.BANKSTATE_NUMBER} in ['23','25','60']) or
({@Division} = 'METRO' and {ACCOUNTX.BANKSTATE_NUMBER} = '63') or
({ACCOUNTX.BANKSTATE_NUMBER} in ['03','3','06','6','20','22','24','33','53','54','64','68','88']))),
iif({?Center}="Milwaukee",({RACCOUNT.REASON_INTO_COL} in ["858","863"]) or
({RACCOUNT.REASON_INTO_COL}="869" and (({@Division} = 'METRO' and {ACCOUNTX.BANKSTATE_NUMBER} in ['23','25','60']) or
({ACCOUNTX.BANKSTATE_NUMBER} in ['10','13','30','42','43']))),
iif({?Center}="Portland",({RACCOUNT.REASON_INTO_COL} in ["859","865"]) or
({RACCOUNT.REASON_INTO_COL}="869" and (({@Division} = 'COMMUNITY' and {ACCOUNTX.BANKSTATE_NUMBER} = '63') or
({ACCOUNTX.BANKSTATE_NUMBER} in ['02','2','29','55','59','66','71']))),
{RACCOUNT.REASON_INTO_COL} in ["869", "858", "859", "860", "861", "862", "863", "864", "865"]))) and
{RACCOUNT.USER_TEXT_1} in ["06", "07", "08", "09"]
If {?Center} = 'HOPKINS' then 'HOPKINS'
ELSE
IF {?Center} = 'PORTLAND' THEN 'PORTLAND'
ELSE
IF {?Center} = 'ALL' THEN 'TOTAL SBLC'
ELSE
'MILWAUKEE'
There is nothing wrong with this formula....I might end it with a ";" and use double quotes instead of single quotes but other than that you are just displaying the value of a parameter that you have selected.
The problem lies not with the formula...it lies with the group
What is the group for the section that this formula is placed???
Is this GROUP based on a formula? or something else?
Show us how the grouping is done.
OR
Is this the grouping formula? I do use constant values in groups for situations where I want to suppress groupings...but part of that formula includes a field that Crystal would normally group on.
Since there is no possible grouping in this formula what-so-ever....Crystal may have some validation that checks this and gives the error. Jim Broadbent
Thanks for the hint. I went back and LOOKEd at my group header 1 definition. Somehow, (it wasnt ME, to coin a movie phrase) the field that it was trying to group had been changed to the reason_into_col field. Weird. Anyway, I deleted and started over, and it apparently works just fine now.
Guess it was just a Friday thing...thanks for all the great
information..from this post and from all posts!!
I discovered that if I change my gh1 formula from
an older version (that used the reason_into_col as a group name determination) to one that uses my parameter ?CENTER as the group name, in the group header window,
CR changed the field to group on to another field,
it decides to use the reason_into_col for some reason. I don't get it...
Is the combination of the wild record selection formula,
group header and name determination?
LGB
Has your database table changed since the report was designed? Inserting or deleting a field in a database table can cause CR to use the wrong field in the report -- apparently CR references fields by a number rather than by name internally. Try running "Verify Database".
yes I agree with Rogar on Verifying the database...since there have been changes.
But I don't agree with using that formula as a group formula...
WHY?
Because you are not grouping anything! All you are doing is setting the Group to a constant...that will be ignored everywhere except in the Tree at the left.
the value of that parameter should be compared to some field to have any effect...
I am reproducing something from before:
**********************************************
GH1:ReportSelect
If {?Center} = 'HOPKINS' then 'HOPKINS'
ELSE
IF {?Center} = 'PORTLAND' THEN 'PORTLAND'
ELSE
IF {?Center} = 'ALL' THEN 'TOTAL SBLC'
ELSE
'MILWAUKEE'
**********************************************
this bothers me: GH1:ReportSelect
it looks to me that you are trying to filter records with this.
This doesn't belong in a Group formula....it belongs in a record selection formula
something like
if {?Center} = "ALL" then
true
else if {?Center} in ("HOPKINS","PORTLAND) then
{Table.value} = {?Center}
else
{Table.value} = "MILWALKEE";
BTW you are also depending on your user to enter the values for {?Center} in CAPS...a more bulletproof approach would be to convert everything to uppercase before the comparisons are made.
Overall....I am not really sure why this formula is used as you are using it.
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.