Is a dataset referenceable to java code called by the report?
Posted on May 11, 2013 at 1:42pm
I am creating a report where there is a need to dynamically create an image based on the data in the report. For example, my data set has x1,y1, w, h. I have an image control which calls a my custom Java Class to dynamically draw rectangles based on this data. So I need to know how to pass the data set into my Java Code or I need to know how get access to the data in the dataset from my class. Please help.
public class CustomImageRenderer extends JRAbstractSvgRenderer
public void render ( Graphics2D g2d, Rectangle2D rect ) throws JRException
g2d.drawRect( 58, 250, 82, 5 ); // would like to source these points from the data set.
g2d.drawRect( 58, 270, 82, 5 );