1. Click on the database icon
2. Select XLS, XLSX format
3. Next
4. Choose file from computer (Desktop/laptop)
5. Click Test if the file data is good for the jaspersoft
6. Then click "Get column names from the first row of the file"
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzqFvxGZwpfi4tOCapQ-kmCmeO02Dmo9gfOQcOAR6u4QzQC8MOyLXF6M-DNIiEV9PaQWKLuvWXkfFDdsf6NwE-5yaSTMhSZ_SzpzDJDaBWIXFEaBjPOpcaQDS6GxcGrHICZEIJj-Izsug/s400/Repository.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtLgJK8zr2bAfNNkHErQt5DEEmkb567GzwHr8XcpwVVPGN75bxtUizfqK3reNtPjfi8FeERse-ETxY0R34wX4rj6I5c2rmaTRslQ7NPkIAXmZC3h6eg_WhZw_G7wziQh5brqbQsLHUEeg/s640/Get+column.jpg)
Unable to get value for Excel field "Score" of class java.lang.String.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNmRJMFggoFwAH9nSJrrq3BbAYwIHYaNYRpdax1_mm2DSvaujtI4QbhEOPLtKZvLkohBKNeYxA0SY-_AokV8U28XTqMzCQIcu1eWy9__BXcWYqKX2JCEDAtkrQuRI2cJpDXpfyk3Qtjf4/s1600/Jaspersoft+Error.jpg)
The solution to this is:
Since the column field are in the form of value (numbers/integers) the class type must be = java.length.short. If the column field is in the form of text then class type = java.length.string
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj-9oB_2vZOWmY7EfcZtISO0VW_nzpFebBrFh4DK31unt0nIX-pVyMGJjL8cmRO81vov2JNFcCiHAL_elQ9fzDT3NsnEHIFkexxArgNyCEnsDvnsYRu0uLLxFZ0z3s5ocbeCYV3-es0KQ/s400/string.jpg)
When the data is preview it shows correctly without errors
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDvu8U32Kg6xrYcD3Y7eH8Py2WidWgobfo0mVobZU5WeG4IN289ZNGL1lJ4fZscFKqpqkmBRKCIWrPRXU5vl8ohSQD3ZlmnEHnEtRmBSZKTwlVodlvKKwMbrTSLKOpsoO2LqpJWBrIC5w/s400/preview.jpg)
Chart settings where
Series = Team (label name)
Value = Points
Key = Team (Column value name)
Once done - click finish (remember the chart will not automatically updated until "preview" is clicked)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYWkR4YQrxj2V48nFqNpkYl66zcnIiVezgY37KSEt6jfhJ9dvCNDqavWI7TnFJNwdl40XjGZxKFxI4AX4868jlsKduXLzpZXGJC1sJlpDVwE6D2dM-ZpvD8B-lM4vbS_eT_hHzvq_7xA0/s400/chart+settings.jpg)
Click preview and this is the output
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEYhLjBw8-SQBY-9V3k7jqXqDIK6C7TGE6mFuhicoATEASrzKOCqs9U7XAle5gBWNr5BYfNhx134Mzhq9uWrtM5X0Vm5Pv2kiWzjIJJjxknZlWWSfrYfuBpR0hSDjlCbkDTm5ZRObVzYc/s400/previewchart.jpg)
Make the pie chart to show value in numbers, label name value, or percentage using the following command in the chart setting
{0} or null = Series value name
{1} = numbers or the value itself
{2} = Percentage
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYVCo86UxzoBZl7RvGkQuzbDKkNzuAjR3p2l0V2eYlodzUd57VFyqiTxksZw6rZaagSDWgM40daQLJ_8H_0JuA4gKMBzzJ0Eayc3WQmV9IMZuCe1vLJRtiEOWtlAKulZuk0udnDvzeg8E/s400/Chart+label+formating.jpg)
No comments:
Post a Comment