2004 IR Help Posted August 21, 2006 Share Posted August 21, 2006 By: JJoshua - enigm0 XPATH: position() 2005-04-15 06:43 Is it possible to use the position() function in the description of a field to determine wich row i'm currently reading in my xml? It seems like i can only use the XPATH abreviated syntax. Thx in advance Link to comment Share on other sites More sharing options...
therockita Posted April 21, 2010 Share Posted April 21, 2010 I think it's not possible to use that function...I have an xml document with this structure:<form> <questions> <question>...</question> <question>...</question> <question>...</question> ... </form>And I'm giving it to my template with XPath /form/questions/questionThen in my template I have a field $F{position} which value is <fieldDescription>position()</fieldDescription>Finally I print that field inside my detail band.It seems that it actually try to use the field $F{posisition}, just that it prints a fix value in every iteration: -1.Can anyone confirm that this is actually a bug? Link to comment Share on other sites More sharing options...
lucianc Posted April 27, 2010 Share Posted April 27, 2010 position() will not work because field XPath expressions are evaluated in the context of the current node (i.e. one of the question nodes), and not in the context of the /form/questions/question node list.Wouldn't $V{REPORT_COUNT} do?Regards,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now