Problem
You receive the following error message when you run a report in Worksheet.
Crystal Report Windows Forms Viewer
Number must be between 0 and 255
Details: errorKind
Solution
This error is caused by an invalid value in the color column of one or more line items in the worksheet.
- Return to the Worksheet view.
- From the Home tab, select Assign...
- Put a check mark next to Color and then left click in the Assign Value area. Select Default from the available colors.
- Click the OK button at the bottom of the Assign window.
- This will assign the default color to all items in the Worksheet.
- Run the report again and the error should no longer occur.
The steps above will reset all line items in the Worksheet to the default color value. If you are using different colors for different line items and do not wish to reset them all to the default color, you could first sort the Worksheet by the color column to group by the different colors used. Then select groups of colors and re-assign the desired color values until you have worked all the way through the worksheet. This should also correct the issue as long as the line item(s) causing the issue is assigned a valid color value.