subreport xpath w ' causes Jasper Exception

By: brent - bvbenson
subreport xpath w ' causes Jasper Exception
2005-04-29 12:20
I have a subreport, with the xpath:

"/Envelope/Body/Response/Asset[UatbAsIMCityName = '"+$F{cityName} +"'][UatbAsIMCntyName = '"+$F{countyName}+"'][UatbAsIMStateName = '"+$F{stateName}+"']"

I have data being returned and the cityName is "land o' lake". This single quote causes my xpath to fail because it evaluates to:

"/Envelope/Body/Response/Asset[UatbAsIMCityName = 'land o' lake'

this causes xpath to have to cause an exception. I have tried:

"/Envelope/Body/Response/Asset[UatbAsIMCityName = '"+$F{cityName}.replaceAll("'","'")+"'][UatbAsIMCntyName = '"+$F{countyName}+"'][UatbAsIMStateName = '"+$F{stateName}+"']")

But then the subreport does not include land o' lakes in the report.

Any ideas? thanks.

Brent
2004 IR Help's picture
Joined: Aug 17 2006 - 3:49am
Last seen: 17 years 1 month ago

1 Answer:

I am having a similar problem. Did you find a solution for this.

Thanks.
ozzie2006's picture
Joined: Feb 8 2007 - 11:44pm
Last seen: 16 years 8 months ago
Feedback