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

CR9 - String now array!? 1

Status
Not open for further replies.

mthompso

Programmer
Apr 9, 2002
22
CA
Error message: This array must be subscripted. For example: Array.

The following formula has been working flawlessly up to and including CR 8.71; now it's CR9 & CR declares
it to be broken. The name of the formula is Yr>2000 and this is all it consists of:
--start formula
if {?AnneeDeDepart} >= "2001" then
{?AnneeDeDepart}
else
{?AnneeDeDepartPlus1}
--end formula

The error message displays when I run the report.
The error message displays when I Alt+C in the Formula Editor, and
"2001" is highlighted.

AnneeDeDepart is a string; "2001" is a string.

Why does CR now think that "2001" is an array.

Incidentally, on other reports which have not been saved in CR9 format, this formula evaluates just fine. Unfortunately, they all have to edited to accommodate a longer key field.
 
I don't know why this would change, but have you checked the parameter to make sure it is still set as a discrete value and that "allow multiple values" is not checked?

-LB
 
Thanks - that was the problem.

In previous CR versions 3 values were passed to this parameter: it's name, the value, and "true".

I tried setting it to "Multiple Values", but that made no difference, then trimmed the values passed to just one, the required value. Everything worked fine until I saved the report.

With Accept Multiple Values unchecked, and Discrete Value checked it works just fine.

Regards - Miles Thompson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top