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

ojbect attays

Status
Not open for further replies.

judyscofield

Programmer
Sep 24, 2001
56
0
0
US
If i have 15 text boxes on my report, is there a way to refer to them one a time with the help of an array? Is there a control array? If they were called Data1 through Data15 for example, could I do a loop throught to set a property based on some criteria set in code elsewhere?

Judy Scofield
 
Sorry, not from within Crystal, you'd need external code.

However you could use formulas instead of text boxes, or formulas in text boxes, and have the formulas reference variables, but then you would not be able to reference them by constructing their names, you'd have to explicitly set them.

Here's an example:

@formula1
whileprintingrecords;
numbervar Formula1

Then in a global formula prior to displaying @formula1 you could use:

@SetFormulas
whileprintingrecords;
numbervar Formula1;

if {table.field} = "Choice 1" then
Formula1 := 1
else
Formula1 := 0;

You might want to share the intent of this process, there may be another solution. Please be sure to include the version of Crystal, version and type of the database, example data and expected output.

Hope this helps to resolve.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top