Hi,
I have a report that came with our Student Management Software. This report has a field {Data.Comment}. The field, {Data.Comment} returns comments one on top of another.
Example...
Great progress
A pleasure to have in class
Demonstrates positive attitude
I changed the report so the comments print across - 3 separate fields.
Example...
Great progress A pleasure to have in class Demonstrates positive attitude
I did this using the Split function. I have 3 formulas...
Split ({Data.Comment},chr(13))[1]
Split ({Data.Comment},chr(13))[2]
Split ({Data.Comment},chr(13))[3]
If a student has 0 comments or 3 comments (3 comments is the max # of comments a teacher may enter), the report runs as expected. However, if a teacher enters 1 comment or 2 comments, the system returns the following error...
A subscript must be between 1 and the size of the array.
I have tried to evaluate for nulls adding IF(IsNull) to the beginning of the second formula but if there is no second comment it errors.
I think I need to evaluate how many (1, 2 or 3) comments there are before I split, but I'm not sure how to do that.
Does anyone know???
CR 9.0
Thanks,
Hillary
I have a report that came with our Student Management Software. This report has a field {Data.Comment}. The field, {Data.Comment} returns comments one on top of another.
Example...
Great progress
A pleasure to have in class
Demonstrates positive attitude
I changed the report so the comments print across - 3 separate fields.
Example...
Great progress A pleasure to have in class Demonstrates positive attitude
I did this using the Split function. I have 3 formulas...
Split ({Data.Comment},chr(13))[1]
Split ({Data.Comment},chr(13))[2]
Split ({Data.Comment},chr(13))[3]
If a student has 0 comments or 3 comments (3 comments is the max # of comments a teacher may enter), the report runs as expected. However, if a teacher enters 1 comment or 2 comments, the system returns the following error...
A subscript must be between 1 and the size of the array.
I have tried to evaluate for nulls adding IF(IsNull) to the beginning of the second formula but if there is no second comment it errors.
I think I need to evaluate how many (1, 2 or 3) comments there are before I split, but I'm not sure how to do that.
Does anyone know???
CR 9.0
Thanks,
Hillary