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

Statement Expected Here -- Help

Status
Not open for further replies.

spence27

Technical User
Feb 2, 2002
28
GB
Im a bit of a newbie to CR, but i'm using CR9 and trying in basic sytax to enter this formula

"CALL DETAIL DATA FOR APPLICATION(s) " + arrayToString ({?APPLIACTION_NUMBER},", " ) + " ON TODAY."

But i keep getting a error mesage saying "A Statement Expected Here". Can someone point out what i am doing wrong - Please

Thanks

 
Using Crystal syntax, you would create a formula like this:

stringvar parm;
numbervar counter;
numbervar i := ubound({?Application_Number});

for counter := 1 to i do(
parm := parm + totext({?Application_Number}[counter],0,"") + ", ");
"CALL DETAIL DATA FOR APPLICATION(s) " + left(parm, len(parm)-2) + " ON TODAY."

-LB
 
spence:

Where does crystal place the cursor in the formula after you get the error message? I suspect it is before the arraytostring text since I don't think that function exists.

If the parameter {?APPLIACTION_NUMBER} is a string, you can alter your formula like this:

"CALL DETAIL DATA FOR APPLICATION(s) " + join({?APPLIACTION_NUMBER},", " ) + " ON TODAY."

If your parameter is not a string data type, you need to use lbass's formula that he posted.



~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top