Jump to content
We've recently updated our Privacy Statement, available here ×

subreport xpath w ' causes Jasper Exception


2004 IR Help

Recommended Posts

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

Link to comment
Share on other sites

  • 5 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...