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

Version 7

Status
Not open for further replies.

pandpp

Programmer
Sep 17, 2003
110
AU
Hi there,

I am running CR8.5, where I have created a report that works brilliantly.

The problem comes when I transfer it to the app, which I have only now been told uses CR7 DLL's. I get the following error (from the app):

'numberVar intCount := 0;
'
The remaining text does not appear to be part of the formula.


Now the formula is pretty basic:

numberVar intCount := 0;

stringVar strResult := '';

For intCount := 1 To UBound({?Person}) Do
strResult := strResult + ', ' + {?Person}[intCount];

Mid(strResult, 3);


Does anyone know why this wouldn't work in CR7?
If so, any solutions?

Thanks,

Peter.
 
hi
looks like you have dll problem.
goto crystal decision to download fix

cheers

pgtek
 
No dll problem here.....CR 7 does not allow For Loops...that didn't come in until CR8.0

numberVar intCount := 0;

stringVar strResult := '';

For intCount := 1 To UBound({?Person}) Do
strResult := strResult + ', ' + {?Person}[intCount];

Mid(strResult, 3);

Array manipulationwas very basic back then too...for example UBound() and Join(,) functions did not exist either...although you might be able to find/create a UFL to do a join.

It looks here that you want to simply display a list of people. Without UBound you cannot know the size of the array (Minimum and Maximum functions work but aren't a real help here.

One possible workaround is to have a fixed number of array elements ....say 5...then build a formula around that testing for blank (not a null) default entry

//@Parameter list

stringVar strResult := {?Parameter}[1];

if length(trim({?Parameter}[2])) <> 0 then
strResult := strResult + &quot;, &quot; + {?Parameter}[2];

if length(trim({?Parameter}[3])) <> 0 then
strResult := strResult + &quot;, &quot; + {?Parameter}[3];

if length(trim({?Parameter}[4])) <> 0 then
strResult := strResult + &quot;, &quot; + {?Parameter}[4];

if length(trim({?Parameter}[5])) <> 0 then
strResult := strResult + &quot;, &quot; + {?Parameter}[5];

strResult;

Ugly...yes...but we had to do a lot of this kinda stuff back then...that is why CR 8.x was such a leap forward.

hope this helps






Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Thanks Jim.

I knew CR7 as bad ( I started with it), but I don't remember it being quite that bad...

I will give your implementation a shot. It's not that pretty, but, I have some array parameters that need showing on the report, so, I don't have many alternatives...

I loaded my old CR7 at home. I see there isn't ANY loop constructs! I thought Crystal still sucked, but it appears I have been spoilt for too long.

Thanks again Jim,

Peter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top