I ran into the problem once again. When implementing the hidden element solution, I put one text field holding SUB_GROUP_ID in the report group header. When this field is printed in the file (currently pdf), then the java code can find the control and can read it text property. However when I hide the field ( by setting new Boolean(false) in the print when expression, then the java code can't find the element as it seems that the method JRPrintPage.getElements() returns only printed elements. Then I changed the element width and height to 5px. Now the java code can find the control, but getText() returns empty string. The interesting point here is while debugging in eclipse shows the field "value" of String holding array of characters of actual value of the field, the String itself is empty with count, hash, offset all set to zero. Then I increased the width and height of the field to only show the 1st character of it's value. Now the getText() returns only the 1st character that is printed. When I increased both height and width to show the full value, then only the getText() returned the full value. So it seems like the element holds only the printed character. But I don't want to print the value in the report. Now, how can I read the correct value from the element ? And can we read value from hidden (not printed) elements?