I am new to Alpha 5 and have what is probably a stupid question. I've read lots of docs and searched the forums, but no luck. So, here's my question.
I want to display a set of steps in a report in a specific order. There are 9 steps and I will display them as text words. That's not the problem. The problem is that the order depends on the values in each of 9 fields. The fields contain a value of 1.0 - 9.0 depending on the order they need to be accomplished. I need to access the field values when the report runs (my script runs onPrintInit) and then display the steps in the appropriate order.
For Example (using 3 of the fields):
if for this record the fields are Weld, paint, ship witht he values 1.0, 2.0, and 3.0 respectively.
How can I display
"Weld"
"Pain"
"Ship"
I've tried the following to no avail. Any suggestions are welcome.
DIM Global First_Step as C
DIM Global Second_Step as C
DIM Global Third_Step as C
DIM Global Fourth_Step as C
DIM Global Fifth_Step as C
DIM Global Sixth_Step as C
DIM Global Seventh_Step as C
DIM Global Eigth_Step as C
DIM Global Ninth_Step as C
DIM Global My_array[1..9] as C
First_Step = " "
Second_Step = " "
Third_Step = " "
Fourth_Step = " "
Fifth_Step = " "
Sixth_Step = " "
Seventh_Step = " "
Eigth_Step = " "
Ninth_Step = " "
for i = 1 to 9
if int(:work_order:welding2.value) = i
My_array[i] = "Welding"
end if
if int(:work_order:laser.value) = i
My_array[i] = "Laser"
end if
if int(:work_order:saw.value) = i
My_array[i] = "Saw"
end if
if int(:work_order:shear.value) = i
My_array[i] = "Shear"
end if
if int(:work_order:pressbrake.value) = i
My_array[i] = "Pressbrake"
end if
if int(:work_order:rolls.value) = i
My_array[i] = "Rolls"
end if
if int(:work_order:paint.value) = i
My_array[i] = "Paint"
end if
if int(:work_order:other.value) = i
My_array[i] = "Other"
end if
if int(:work_order:shipping_and_handling.value) = i
My_array[i] = "S&H"
end if
next i
First_Step = My_array[1]
Second_Step = My_array[2]
Third_Step = My_array[3]
Fourth_Step = My_array[4]
Fifth_Step = My_array[5]
Sixth_Step = My_array[6]
Seventh_Step = My_array[7]
Eigth_Step = My_array[8]
Ninth_Step = My_array[8]
I want to display a set of steps in a report in a specific order. There are 9 steps and I will display them as text words. That's not the problem. The problem is that the order depends on the values in each of 9 fields. The fields contain a value of 1.0 - 9.0 depending on the order they need to be accomplished. I need to access the field values when the report runs (my script runs onPrintInit) and then display the steps in the appropriate order.
For Example (using 3 of the fields):
if for this record the fields are Weld, paint, ship witht he values 1.0, 2.0, and 3.0 respectively.
How can I display
"Weld"
"Pain"
"Ship"
I've tried the following to no avail. Any suggestions are welcome.
DIM Global First_Step as C
DIM Global Second_Step as C
DIM Global Third_Step as C
DIM Global Fourth_Step as C
DIM Global Fifth_Step as C
DIM Global Sixth_Step as C
DIM Global Seventh_Step as C
DIM Global Eigth_Step as C
DIM Global Ninth_Step as C
DIM Global My_array[1..9] as C
First_Step = " "
Second_Step = " "
Third_Step = " "
Fourth_Step = " "
Fifth_Step = " "
Sixth_Step = " "
Seventh_Step = " "
Eigth_Step = " "
Ninth_Step = " "
for i = 1 to 9
if int(:work_order:welding2.value) = i
My_array[i] = "Welding"
end if
if int(:work_order:laser.value) = i
My_array[i] = "Laser"
end if
if int(:work_order:saw.value) = i
My_array[i] = "Saw"
end if
if int(:work_order:shear.value) = i
My_array[i] = "Shear"
end if
if int(:work_order:pressbrake.value) = i
My_array[i] = "Pressbrake"
end if
if int(:work_order:rolls.value) = i
My_array[i] = "Rolls"
end if
if int(:work_order:paint.value) = i
My_array[i] = "Paint"
end if
if int(:work_order:other.value) = i
My_array[i] = "Other"
end if
if int(:work_order:shipping_and_handling.value) = i
My_array[i] = "S&H"
end if
next i
First_Step = My_array[1]
Second_Step = My_array[2]
Third_Step = My_array[3]
Fourth_Step = My_array[4]
Fifth_Step = My_array[5]
Sixth_Step = My_array[6]
Seventh_Step = My_array[7]
Eigth_Step = My_array[8]
Ninth_Step = My_array[8]
Comment