FieldPageRef field = (FieldPageRef)builder.insertField(FieldType.FIELD_PAGE_REF, false);
// We will write the following field code // PAGEREF Test1 \h \p field.setBookmarkName(“Test1”);
field.setInsertHyperlink(true);
field.setInsertRelativePosition(true);
I can’t use the DocumentBuilder in this case. We almost never do.
We start from a small template containing all the styles, etc… and build our report from that.
I now inserted a pageref field in my template. During report generation,I fetch it, deepclone it, and then update the value. So that works now.
So is it correct that, in 15.1 you can’t just create a field with a constructor, like my example, and add it to any paragraph, without the need of a builder ?