Rotating Text/Image with JRotator
JRotator is used to rotate text or images. Since Logi JReport currently supports rotating only images but not text, using JRotator to achieve text rotation becomes a feasible solution. JRotator rotates the text inside the JRotator object but not the object itself so if you rotate text or DBFields you may have to change the size of the container in order to see the full value.
Below is a list of the sections covered in this topic:
Using JRotator to Rotate Text
- Start Logi JReport Designer and open the report in which you want to insert some rotated text.
- Select Insert > UDO to display the Insert UDO dialog.
- Select JRotator from the UDO drop-down list, and then select OK.
- Keep the JRotator focused and go to the Report Inspector.
- Locate the Display Value property and type in the required text in the value cell, then select outside of the cell. You will then see the typed text displayed in the JRotator.
- Specify a rotation degree in the value cell of the Rotate property, for example, 180, then select outside of the cell. You will then find the text in the JRotator upside down.
- Save the report.
Using JRotator to Rotate an Image
- Start Logi JReport Designer and open the report in which you want to insert a rotated image.
- Select Insert > UDO.
- In the Insert UDO dialog, select JRotator from the drop-down list, and then select OK.
- Keep the JRotator focused and go to the Report Inspector.
- Specify the local path of the required image in the value cell of the Display Image property, for example, C:\image.jpg, then select outside of the cell. You will then see the image displayed in the JRotator.
- Specify a rotation degree in the value cell of the Rotate property, for example, 45, then select outside of the cell. You will then find the image in the JRotator at a 45 degree angle.
- Resize the JRotator container as needed to view the entire image.
- Save the report.
Using JRotator to Rotate a DBField
- Start Logi JReport Designer and open the report in which you want to insert a rotated DBField.
- Select Insert > UDO.
- In the Insert UDO dialog, select JRotator from the drop-down list, and then select OK.
- Keep the JRotator focused and go to the Report Inspector.
- In the Display Value value cell, select the required DBField or create a formula for a calculated field and select the formula from the dropdown list. Then select outside of the cell and you will see the DBField displayed in the JRotator.
- Specify a rotation degree in the Rotate value cell, for example, 90, then select outside of the value cell. You will then find the DBField in the JRotator at a 90 degree angle.
- Change the size of the JRotator container as needed to view the entire text.
- Save the report.